htaccess 301 重定向不起作用

发布于 2024-10-31 22:52:11 字数 1009 浏览 1 评论 0原文

我正在尝试将旧页面重定向到新页面,但这不起作用。我已在 .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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眼眸印温柔 2024-11-07 22:52:11

这有效。我将其添加到 .htaccess 的顶部

RewriteBase / 
RewriteRule ^index.html$ indiacustomercare.com/reciprocal-link-exchange-add-your-url [R=301,L] 

This worked. I added this in the top of .htaccess

RewriteBase / 
RewriteRule ^index.html$ indiacustomercare.com/reciprocal-link-exchange-add-your-url [R=301,L] 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文