0

如何通过 301 重定向,从http://mydomain.com/index.phphttp://mydomain.comhttp://mydomain.com/variablehttp://mydomain.com?我试过这个,但不起作用:

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^http://mydomain.com/variable [nc]
rewriterule ^(.*)$ http://mydomain.com/$1 [r=301,nc]
4

1 回答 1

0

尝试:

RedirectMatch 301 ^/index.php$ /
RedirectMatch 301 ^/variable$ /
于 2013-03-08T22:55:00.023 回答