Hey, right now I have this in my htaccess to strip .php file extension RewriteEngine On RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)\.php\ HTTP/ [NC] RewriteRule .+ http://www.websiteconsultants.org/%1 [R=301,QSA] Code (markup): ...although I am having one issue, the index.php file now becomes index...I would like the hp to just be http://www.websiteconsultants.org and not http://www.websiteconsultants.org/index I tried to 301 it like this....but it didnt work: Redirect 301 /index http://www.websiteconsultants.org How do I remove the /index ?
Put the rule before it to redirect index.php and use [L] so it stops processing before the next rule. RewriteEngine On RewriteRule ^index\.php$ / [R=301,L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)\.php\ HTTP/ [NC] RewriteRule .+ http://www.websiteconsultants.org/%1 [R=301,QSA] Code (markup):
Thanks by the way, that was helpful. Usually I just 301'd it but it didn't work in this instance. Thanks again for the fix.