假设我希望所有对example.com的请求都redirect到abc.com。
如何将所有内容redirect到abc.com的根目录并且不包含example.com中包含的任何path或参数?
例如
example.com/index.py?var=1 should go to abc.com
我在我的.htaccess中试过
RedirectPermanent / http://www.abc.com
但它是这样做的:
example.com/index.py?var=1 goes to abc.com/index.py?var=1
您可以使用以下redirect:
RedirectMatch permanent . http://www.abc.com