我有一堆重写规则redirect访问从domainX到domainY,但现在我想显示一个index.html页面,当人们访问domainX,但我仍然希望所有其他重写规则适用。
我读了stackoverflow,我可以在顶部添加这样的东西:
RewriteRule ^index.html - [L]
然而它不工作。 我不知道为什么。 有什么build议么?
注意:当前的重写configuration文件在这里可用。
这将是我的解决scheme:
RewriteCond %{HTTP_HOST} ^(.*)whiterabbitpress.com$ [NC] RewriteCond %{REQUEST_URI} !^/index.html$ [NC] RewriteRule ^new-arrivals.html$ http://shop.whiterabbitjapan.com/japanese-language/new-arrivals.html [L,R=301] [...]
这意味着只有当主机名为* .whiterabbitpress.com,path不是 /index.html时,才会使用以下所有规则。
荣誉给你张贴实际的configuration,而不是摧毁它,这真的使它更容易帮助!