Making a rewriterule remove .php extension?
- by Sam
Hello, I have come up with a rewriterule to to go to any page on my website without typing in the .php extension because it is automatically added to the url.
The rule is: RewriteRule ^(\w+)/?$ /$1.php
It takes anything you type in my index and adds .php to it, so you can put in http://sampardee.com/index and it pulls up index.php
Now my question is how to detect when a user enters http://sampardee.com/index.php and change it to http://sampardee.com/index
How could I do so with a rewriterule?