htaccess重写
我现在使用:
RewriteEngine on
RewriteRule !^index.html http://samedomain.com [L,R=301]
以便所有查询都进入 http://samedomain.com ...(通常它会加载索引.html) index.html 被排除,因此它不会出现无限循环。
我可以打开 http://samedomain.com/index.html 很好..它不会重定向。 对子页面的其他请求会重定向到 http://samedomain.com 但它不会打开页面。
如果您能告诉我如何将所有请求重定向到,那就太好了 http://samedomain.com 以及如何排除 2 个文件(index.html 和 image.jpg) 排除在该重新路由之外。
谢谢 克里斯
I use right now:
RewriteEngine on
RewriteRule !^index.html http://samedomain.com [L,R=301]
so that all inquires go the http://samedomain.com ...(usualy it would load index.html)
the index.html is excluded so it does not come a endless loop.
i can open http://samedomain.com/index.html FINE.. it does not come redirected.
And other requests to subpages come redirected to http://samedomain.com
BUT it does not open the page.
Would be great you can tell me how to redirect all requests to
http://samedomain.com AND how to exclude 2 Files (the index.html and an image.jpg)
excluded from that rerouting.
thx
chris
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)