我有一个客户,他在GoDaddy拥有其域名 www.clientdomain.com 。 我们被要求在我们使用的主机(20i https://www.20i.com/)上托管他们的网站。
在20i上,我们在 www.ourhost.co.uk/clientsubdir / 的子目录中有网站设置,并且在 / clientsubdir / 内有一个WordPress网站为他们建造的。
我们面临的问题。
当前,我们已将.htaccess文件编辑为以下内容:
#+PHPVersion
#="php70"
AddHandler x-httpd-php70 .php
#-PHPVersion
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /clientsubdir/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /clientsubdir/index.php [L]
</IfModule>
# END WordPress
在WordPress中,我的网站config.php进行了以下修改,因此它正在查看子目录:
define('WP_HOME','http://www.ourhost.co.uk/clientsubdir/');
define('WP_SITEURL','http://www.ourhost.co.uk/clientsubdir/');
这会将其域中的每个页面显示为 www.clientdomain.com ,这有助于但未正确显示永久链接或网站的正确结构。
我希望如何与我们联系页面的示例:
浏览器顶部的域链接显示: www.clientdomain.com
(由于我相信.htaccess文件的覆盖属性)
被检查的链接显示为 www.ourhost.co.uk/clientsubdir/contact
当客户将鼠标悬停在Google上时,我希望它显示为 www.clientdomain.com/contact
有人知道我要去哪里错吗?
谢谢。