我对.htaccess规则很糟糕,所以你能帮忙解决这个问题吗?
我正在寻找这种情况:
No matter what subdomain the request is for, the visitor is 301'd to the root of the domain.
所以,例如:
但是,仅适用于index.html
:
提前感谢大家的帮助!
答案 0 :(得分:0)
RedirectMatch 301 (.*)doma.in(.*)$ http://doma.in$2
几乎所有“doma.in之前的内容都会被忽略,但域名之后的所有内容都会被正常重定向(通知$2
,$1
就是域名”doma.in之前的所有内容“但我认为你不需要......如果你告诉我,我会编辑我的答案”
希望它有所帮助