.htaccess to Redirect all Pages to one Domain
I have one site that I never perused and I might as well redirect all pages there to my current project. I am currently abl开发者_高级运维e to redirect to a mirror url, which means only the home page redirects to the new home page.
But how can I do it so that all the pages on the old site redirect to http://www.comehike.com
Here is my current .htaccess file
Options +FollowSymLinks
RewriteEngine On
RewriteRule (.*) http://www.comehike.com/$1 [R=301,L]
Thanks, Alex
Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^old-domain.com [NC] RewriteRule ^(.*)$ http://new-domain.com/$1 [L,R=301]
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?old\.com
RewriteRule (.*) http://www.new.com/$1 [R=301,L]
精彩评论