Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Redirecting index.php to root, but no other index


jdMorgan - 5:57 pm on Oct 14, 2009 (gmt 0)


Get rid of the ambiguous ".*" pattern, which matches anything, everything, or nothing at all:

RewriteCond %{THE_REQUEST} ^[A-Z]+\ /index\.php(#[^?\ ]*)?(\?[^\ ]*)?\ HTTP/
RewriteRule ^index\.php$ http://www.example.com/$1 [R=301,L]

Note that the extra bits at the end of the RewriteCond pattern allow for fragment identifiers (HTML named anchors) or query strings on "index.php", but do not allow a match on, for example, ".php5" or ".phpx".

Jim


Thread source:: http://www.webmasterworld.com/apache/4006993.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com