我的网站www.xyz.co.uk.这个网站在一些旧的链接 www.abc.co.uk/xxx我需要用户点击任何旧链接然后重定向 www.xyz.co.uk页面。我尝试htaccess规则写但不工作。
# Redirect to xyz.co.uk
<IfModule mod_rewrite.c>
# For security reasons, Option followsymlinks cannot be overridden.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^abc.co.uk [OR]
RewriteCond %{HTTP_HOST} ^www.abc.co.uk [NC]
RewriteRule ^(.*)$ http://www.xyz.co.uk/$1 [L,R=301]
</IfModule>
# Redirect to xyz.co.uk end