将域从 ExampleShop.com 更改为 ExampleStore.com
我在尝试重定向大约 30 个特定页面并为 URL 映射未仅更改域的页面执行通用重定向时遇到问题。
这就是我所拥有的,它使用通用重写规则重定向所有内容,而不是重定向特定的重写。
Options +FollowSymLinks
RewriteEngine on
#Specialty Rewrites for non-exact mapped URLs
RewriteRule ^/gifts/jewellery/bracelets.html$ http://www.ExampleStore.com/gifts/jewellery/bracelets.html [R=301,L]
RewriteRule ^/gifts/watches/banded.html$ http://www.ExampleStore.com/gifts-for-him/jewellery/watches.html [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#Generic Rewrite for exact mapped URLs
RewriteRule ^(.*)$ http://www.ExampleStore.com/$1 [R=301]