强制非www的网址在Word preSS安装会导致死循环 [英] Forcing non-www url in Wordpress installation causes infinite loop

查看:329
本文介绍了强制非www的网址在Word preSS安装会导致死循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想重写 HTTP://www.domain 到的 HTTP:一句话preSS安装//域,但它看起来就像来自 HTTP使得URL循环:// WWW 到http://再换 HTTP:// WWW

I am trying to rewrite http://www.domain to http://domain in a wordpress installation, but it looks like it's making the url loop from http://www to http:// and back to http://www, etc.

这是我的htaccess的:

This is my htaccess:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

有什么不对的code?

What's wrong with this code?

推荐答案

字preSS能为你做到这一点。删除你已经添加了的.htaccess的东西,并进入选项 - >常规,改变你的网站的网址

WordPress can do this for you. Remove the .htaccess stuff you've added, and go to Options -> General and change your site's URL.

这篇关于强制非www的网址在Word preSS安装会导致死循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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