Forum Moderators: phranque
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yoursite.com [NC]
RewriteRule ^(.*)$ [yoursite.com...] [L,R=301]
How would I make this so that if you go to
[mysite.com...]
it'll go to
[mysite.com?...]
?
That does work somewhat, but when I go to a subdir,
[mysite.com...]
it doesn't change it.
Does that matter for SEO reasons? I think I would prefer it if it changed.
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^ww[b]w\.e[/b]xampl[b]e\.c[/b]om [NC]
RewriteRule (.*) http://example.com/$1 [L,R=301]
If you have not done so already, flush your browser cache (delete IE Temporary Internet Files) before testing any change to your .htaccess code. Otherwise, your browser may show you a response cached before the change, and continue to do so for days, unless you force a page reload or overwrite that cache entry with something newer just by using your browser on other sites.
For more (general) information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim