强制非www的网址在Word preSS安装会导致死循环网址、www、preSS、Word

2023-09-02 00:39:12 作者:弥猫深巷

我想重写 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.