Forum Moderators: phranque
What it is suppose to do is when a user enters sitename.com/index.php or sitename.com/index.html it should display just sitename.com/.
Any ideas on what I'm doing wrong
RewriteEngine on
RewriteCond %{THE_REQUEST} ^GET\.*/index\.(php¦html)\HTTP
RewriteRule ^(.*)index\.(php¦html)$/$1 [R=301,L]
RewriteEngine on
RewriteCond %{THE_REQUEST} ^GET\ /([^/]+/)*index\.(php¦html)\ HTTP/
RewriteRule ^(([^/]+/)*)index\.(php¦html)$ http://www.example.com/$1 [R=301,L]
IF there are no other RewriteRules in the file (i.e. these are your first rules), then you may need to add
Options +FollowSymLinks
Same deal as usual -- fix the pipes. :)
Jim