Forum Moderators: phranque
RewriteCond %{QUERY_STRING} ^_fb_q=
RewriteRule ^(index\.php)?$ http://www.example.com/? [R=301,L]
RewriteCond %{QUERY_STRING} ^([^&]+&)*_fb_q=
RewriteRule ^(index\.php)?$ http://www.example.com/? [R=301,L]
RewriteCond %{QUERY_STRING} ^([^&]+&)*_fb_q=
RewriteRule ^(index\.htm)?$ http://www.example.com/? [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/
RewriteRule ^(([^/]+/)*)index\.php$ http://www.example.com/$1 [R=301,L] You do need a rewritecond to prevent an infinite loop if DirectoryIndex is set (as is customary) to include index.php.
RewriteCond %{QUERY_STRING} ^([^&]+&)*_fb_q=
RewriteRule ^(index\.php)?$ http://www.example.com/? [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /index\.(php|html?)\ HTTP/
RewriteRule ^index\.(php|html?)$ http://www.example.com/ [R=301,L]