HTACCESS 编辑的重定向问题
重写引擎开启 RewriteCond %{HTTP_HOST} ^tsgcs.ca$ RewriteRule (.*) http://www.tsgcs.ca/$1 [R=301,L]
这给了我错误“Firefox 已检测到服务器正在以永远不会完成的方式重定向对此地址的请求。”
有什么想法吗?
RewriteEngine On
RewriteCond %{HTTP_HOST} ^tsgcs.ca$
RewriteRule (.*) http://www.tsgcs.ca/$1 [R=301,L]
This is giving me errors 'Firefox has detected that the server is redirecting the request for this address in a way that will never complete.'
Any ideas why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正尝试将 URL 的非 www 版本重定向到 www 版本。几乎是正确的,但是 RewriteRule 中的匹配不太正确。看一下这里的示例:
http://www.webweaver.nu/html -tips/web-redirection.shtml
You're trying to redirect the non-www version of a URL to the www version. It's almost correct, but the matching in the RewriteRule isn't quite right. Take a look at the examples here:
http://www.webweaver.nu/html-tips/web-redirection.shtml