Page is a not externally linkable
madmatt69 - 11:18 pm on Jan 28, 2010 (gmt 0)
I ended up grabbing the code from this thread: However the query string remains - What would be the best way to modify this code to get it to include redirecting the query string? [edited by: jdMorgan at 5:29 am (utc) on Jan. 29, 2010]
Thanks!
[webmasterworld.com...] #Fix canoncial issues: http://www.webmasterworld.com/apache/4069463.htm
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /([^/]+/)*index\.php\ HTTP/ [NC]
RewriteRule ^(([^/]+/)*)index\.htm$ http://www.example.com/$1 [NC,R=301,L]
#
RewriteCond %{HTTP_HOST} example\.com [NC]
RewriteCond %{HTTP_HOST} !=www.example.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
#
RewriteCond %{HTTP_HOST} !^(www\.example\.com|0\.0\.0\.0)?$
RewriteRule ^ - [F]
#END canonical
[edit reason] example.com [/edit]