简体   繁体   English

WordPress网站域问题

[英]Wordpress Site Domain Issue

I have a site www.xyz.com . 我有一个网站www.xyz.com when i typed www.xyz.com in the address bar of the browser it is getting redirected to xyz.com without www . 当我在浏览器的地址栏中键入www.xyz.com ,它将被重定向到不带www xyz.com
I even tried to redirect the domain url to www.xyz.com in .htaccess file. 我甚至尝试域URL重定向www.xyz.com.htaccess文件。 but it is generating an error as indefinite loop. 但它会产生无限循环错误。

Please help me to resolve this issue. 请帮助我解决此问题。

That is really easy to fix, just go to the admin part, in settings/general and add www to the site and home url's name! 这真的很容易修复,只需转到设置/常规中的管理部分,然后将www添加到站点和主URL的名称即可!

在此处输入图片说明

That is due to permalink setting in you Wordpress installation. 这是由于Wordpress安装中的永久链接设置所致。

Make sure to change these 2 URLs in your permalink setting: 确保在您的永久链接设置中更改以下两个URL:

  1. Site URL 网站网址
  2. Home URL 起始网址

To make sure both of them start with http://www.xyz.com 为确保两者均以http://www.xyz.com开头

There are two places to check, first log into the wordpress install and go to general settings, and change the following entries: 有两个地方需要检查,首先登录到wordpress安装并进入常规设置,然后更改以下条目:

WordPress Address (URL)
Site Address (URL)

If the textboxs are grey, then SFTP into your server and edit the wp-config.php file. 如果文本框为灰色,则通过SFTP进入服务器并编辑wp-config.php文件。 Look for the following lines in it, and add www. 在其中寻找以下几行,并添加www. in front of the domain. 在域的前面。

define('WP_HOME', 'http://domain.com');
define('WP_SITEURL', 'http://domain.com');

PS it won't say domain, it'll have your domain there. PS它不会说域名,它将在其中拥有您的域名。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM