htaccess 301 重定向不起作用
我正在尝试将旧页面重定向到新页面,但这不起作用。我已在 .htaccess 文件的开头添加了这些“重定向”。当我在底部添加时,它给出了服务器配置错误错误。如何让它发挥作用? 同样的情况也适用于我基于 Joomla 的网站。 当我在 Firefox 中输入“http://www.indiacustomercare.com/toll-free-customer-care-numbers-in-india.html”时,出现错误:
页面未正确重定向 Firefox 已检测到服务器 正在重定向此请求 以永远不会的方式解决 完成。
* 此问题有时可能是由于禁用或拒绝
接受 饼干。
以下是我在 .htaccess 开头添加的行
redirect 301 /toll-free-customer-care-numbers-in-india.html http://www.indiacustomercare.com/toll-free-customer-care-numbers-india
redirect 301 /vodafone-customer-care.html http://www.indiacustomercare.com/vodafone-customer-care-helpline-numbers
redirect 301 /airtel-customer-care.html http://www.indiacustomercare.com/airtel-customer-care-contact-helpline-call-center-numbers
redirect 301 /xmap-1.html http://www.indiacustomercare.com/sitemap
redirect 301 /index.html http://www.indiacustomercare.com/reciprocal-link-exchange-add-your-url
I'm trying to redirect my old pages to new pages but this is not working. I've added these "redirects" in the very beginning of the .htaccess file. When I added in the bottom, it gave server misconfiguration error. How to make it work?
Same would work in my Joomla based websites.
When I type "http://www.indiacustomercare.com/toll-free-customer-care-numbers-in-india.html" in Firefox it's giving error:
The page isn't redirecting properly
Firefox has detected that the server
is redirecting the request for this
address in a way that will never
complete.* This problem can sometimes be caused by disabling or refusing to
accept
cookies.
Here are the lines I've added in the very beginning of .htaccess
redirect 301 /toll-free-customer-care-numbers-in-india.html http://www.indiacustomercare.com/toll-free-customer-care-numbers-india
redirect 301 /vodafone-customer-care.html http://www.indiacustomercare.com/vodafone-customer-care-helpline-numbers
redirect 301 /airtel-customer-care.html http://www.indiacustomercare.com/airtel-customer-care-contact-helpline-call-center-numbers
redirect 301 /xmap-1.html http://www.indiacustomercare.com/sitemap
redirect 301 /index.html http://www.indiacustomercare.com/reciprocal-link-exchange-add-your-url
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这有效。我将其添加到 .htaccess 的顶部
This worked. I added this in the top of .htaccess