Drupal localhost重定向到www.localhost.com [英] Drupal localhost redirecting to www.localhost.com

查看:156
本文介绍了Drupal localhost重定向到www.localhost.com的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



现在问题是当我去:


http://www.site.com


这一切都很好,但是当我去:


http:// localhost / work / site


我被重定向到


http://www.localhost.com/work/site


我已经运行了install.php脚本,一切都很好用。它重新安装所有东西,但是当我去主站点时,重定向发生。



我删除了.htaccess文件,没有做任何事情。



我正在使用Windows 7终极64(也尝试在winxp pro 32)apache 2.2,php 5.2.13



任何人都知道,这个?



谢谢

解决方案

重定向是由Firefox无法造成的以获得与本地服务器的良好连接,然后尝试修复地址。您可以按照以下方式禁用Firefox中的行为:


  1. 在地址栏
    中键入about:config并返回。 li>
  2. 查找browser.fixup.alternate.enabled。

  3. 双击true值。该行将变为粗体,
    值将更改为false从这里

但是这不会解决你的底层问题(本地服务器没有响应)它只会摆脱真正烦人的行为。有几个可能的原因导致此故障,MatW建议的主机文件问题是一个常见原因。



在我的情况下,Drupal似乎在某些页面加载时崩溃了Apache,当您的浏览器不断重定向到您需要刷新的页面时,很难诊断/修复。


I am working on a drupal site which I checked out (svn) to my localhost.

Now the problem is that when I go to:

http://www.site.com

it all works fine, but when I go to:

http://localhost/work/site

I get redirected to

http://www.localhost.com/work/site

I have ran the install.php script and all works great. It reinstalls everything but when I go to the main site the redirect occurs.

I removed the .htaccess file, didn't do anything.

I am using windows 7 ultimate 64 (also tried on winxp pro 32) apache 2.2, php 5.2.13

Anyone know anyway to fix this?

Thanks

解决方案

The redirect is caused by Firefox not being able to get a good connection with the local server and then trying to "fix" the address. You can disable the behavior in Firefox as follows:

  1. Type about:config in the address bar and hit return.
  2. Find browser.fixup.alternate.enabled.
  3. Double click the "true" value. The line will become bold, and the value will change to "false" from here

However that will not solve your underlying problem (local server isn't responding right), it will just get rid of really annoying behavior. There are several possible causes of this failure, the host file problem MatW suggested is a common cause.

In my case Drupal seems to be crashing Apache during certain page loads, which is hard to diagnose/fix when your browser keeps redirecting itself away from the page you need to refresh.

这篇关于Drupal localhost重定向到www.localhost.com的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆