WordPress removing WWW

ぃ、小莉子 提交于 2019-12-24 08:34:53

问题


I've recently set up a WordPress blog and it's removing the www from all URLs. I've disabled all plug-ins, and it still does that.

My .htaccess is:

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

# END WordPress

I don't see anything wrong with it.

It's the latest version of WordPress.

How can I fix it? I would like to have all URLs with www.

Thanks in advance.


回答1:


You should be able to adjust this in the UI options / preferences in your running WordPress installation.

Go to "General Settings" and change the "WordPress address (URL)" and "Blog address (URL)" to what is appropriate. In your case, I'd expect that you'd need to add the "www" to it.

Here's a screenshot of the section so it's clear: Screen shot of the general settings area. http://theopensourceu.com/wp-content/uploads/2009/10/WP-GeneralSettings.JPG




回答2:


This is not related to your .htaccess file. Wordpress versions since 2.3 will do 301 redirects based on the domain you have set set for your "Blog address(URL)" in Settings → General.



来源:https://stackoverflow.com/questions/1651252/wordpress-removing-www

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!