标签: .htaccess redirect url-redirection
我想将我的网站www.example.com的根目录重定向到www.example2.com 但不是子文件夹www.example.com/subfolder! 有可能吗?
E.G。 以下规则重定向我的所有网站:
Redirect 301 / http://www.example2.com
答案 0 :(得分:2)
要仅重定向根,可以使用以下
RedirectMatch 301 ^/$ http://example2.com/