tegan
04-28-2009, 10:40 PM
Hello,
I have loads of files with .php extensions. I would like help writing a mod rewrite rule that will remove the .php extension from urls like this:
mysite.com/mypage.php
I need to retain the "mypage" and pass that on to a controller somehow.
mysite.com/view.php?page=mypage
But here is the catch... I don't want the url to show view.php?page=mypage, but I still want somehow for the view.php file to be loaded with that parameter.
Can I combine rewrite rules. One to remove the extension, one to pass the parameter to the view.php file, and one to change the url to finally be something like this:
mysite.com/mypage
Any ideas?
I have loads of files with .php extensions. I would like help writing a mod rewrite rule that will remove the .php extension from urls like this:
mysite.com/mypage.php
I need to retain the "mypage" and pass that on to a controller somehow.
mysite.com/view.php?page=mypage
But here is the catch... I don't want the url to show view.php?page=mypage, but I still want somehow for the view.php file to be loaded with that parameter.
Can I combine rewrite rules. One to remove the extension, one to pass the parameter to the view.php file, and one to change the url to finally be something like this:
mysite.com/mypage
Any ideas?