字preSS重写重定向失败 [英] Wordpress Rewrite Redirect Failure

查看:178
本文介绍了字preSS重写重定向失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在帮一个朋友从混乱外包一句话preSS网站恢复造成他(错误#1),我有这个奇怪的错误。他使​​用出现的主机被重定向www.domain.com到domain.com(NFI为什么)自动其中除了IE浏览器的每一个工作正常(我知道吧!)。因此增加固定第一重定向,直到我说的永久重定向。现在,当IE去一个老字preSS环节如 http://www.domain.com/ ?p = 520 重定向失败。

I'm helping a friend recover from the mess outsourcing a wordpress website caused him (mistake #1) and I have this weird error. The hosting he is using appears to be redirecting www.domain.com to domain.com (NFI why) automatically which works fine in every browser except IE (i know right!). So adding the first redirect fixed that, until I added the permalink redirect. Now when IE goes to an old wordpress link like http://www.domain.com/?p=520 the redirect fails.

RewriteEngine On
RewriteBase /

# Rewrite rule for wierd redirect issue
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule ^/?(.*)$ "http\:\/\/doman\.com\/$1" [R=301,L]

# Rewrite Rule for Wordress Permalinks
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

我用wget测试了这一点,并抱怨:

I tested this out with wget and it complains:

ERROR: Redirection (301) without location.

所以,它很可能是IE浏览器是由相同的错误痛苦(没有有用的错误消息)。但是,我还没有线索如何解决它。我希望他会转托管公司,但我们将拭目以待。在此期间任何想法?

So it seems likely that IE is suffering from the same error (without the helpful error message). But I haven't a clue how to fix it. I am hoping that he will switch hosting companies but we will see. In the meantime any ideas?

推荐答案

我会回答为什么www.domain.com是domain.com
第三方开发人员必须一直是德precated WWW运动下。

I will answer why "www.domain.com" was "domain.com", the 3rd party developer must have been under the deprecated www movement.

基本上,它应该不会影响到任何浏览器。我建议重新缓存并或冲洗你的dns。

Basically, it shouldn't have affected any of the browsers. I do suggest resetting your cache and or flushing your dns.

尝试删除:

# Rewrite rule for wierd redirect issue
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule ^/?(.*)$ "http\:\/\/doman\.com\/$1" [R=301,L]

然后重新上传看看它是否工作正常。如果没有,删除缓存。刷新,看看它是否工作properbly。如果仍然不行,请尝试刷新您的DNS。

Reupload then see if it works properly. If not, delete your cache. Refresh to see if it works properbly. And if it still not, try flushing your DNS.

如果您使用的是Windows,你可以刷新从命令提示符您的DNS。

If you using Windows, you can flush your DNS from the Command Prompt.

这是我采取的步骤:


  1. 开始

  2. 运行

  3. Cmd的

  4. IPCONFIG /冲洗的DNS

有关的任​​何其他O.S.我不确定如何刷新DNS。

For any other O.S. I am unsure how to flush the DNS.

我通常把这些precautions当我切换主机的域名,但因为它是域名相关的,这可能是相关的。希望有所帮助。

I usually take these precautions when I switch hosts for the domain name but this may be related as it is domain related. Hope that helps.

我也想补充一点,一个普通的Word preSS .htaccess文件看起来是这样的:

I also want to add that a regular Wordpress .htaccess file looks like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

所以,如果一切都失败了,只需更换的基本字preSS的.htaccess code一切。

So if all else fail, just replace everything with the basic Wordpress .htaccess code.

好运:)

这篇关于字preSS重写重定向失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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