Forum Moderators: phranque
[edited by: phranque at 6:06 pm (utc) on Jul 30, 2013]
[edit reason] Please Use Example.com [webmasterworld.com] [/edit]
RewriteRule On
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) http://www.example.com/$1 [R=301,L] RewriteRule On
RewriteCond %{QUERY_STRING} .
RewriteRule (.*) http://www.example.com/$1 [R=301,L] "RedirectMatch 301 /specificFileName(.*) http://www.example.com/phpfiles/myfile.php?someID=1234"
and for all basic .html files...
"Redirect 301 blah blah"
All these work fine.
RewriteRule On
RewriteCond %{THE_REQUEST} \?
RewriteRule (.*) http://www.example.com/$1 [R=301,L] (.*) pattern should be further refined so that it matches only requests for the old site URLs, perhaps ^(index\.php) or somesuch. (tree|branch|twig) and adjusting the $n numbers in the rule target.