【发布时间】:2015-04-17 20:31:15
【问题描述】:
所以我在域中有一个现有的 wordpress,并在域文件夹(域/子域/)内的一个新文件夹(子域)中安装了一个全新的 wordpress。现在我想使用 subdomain.domain.com 访问这个新的 wordpress。能够做到这一点,但随后图像出现问题。能够修复它,但是我现在遇到了 wp-blog-header.php 等文件的问题。这里有更多细节希望有人能告诉我我哪里出错了:
.htaccess of Domain
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
RewriteEngine On
RewriteCond %{HTTP_HOST} ^subdomain\.domain\.com$
RewriteCond %{REQUEST_URI} !^/subdomain/
RewriteRule (.*) /subdomain/$1
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$
RewriteRule ^subdomain/(.*)$ http://subdomain.domain.com/$1
.htacccess 子域为空。
在 wp-config 我有这些:
define( 'WP_SITEURL', 'http://subdomain.domain.com' );
define( 'WP_HOME', 'http://domain.com/subdomain' );
当前错误是
Warning: require(/clientdata/apache-www/b/o/domain.com/www/subdomain/subdomain/wp-blog-header.php)
[function.require]: failed to open stream: No such file or directory in
/clientdata/apache-www/b/o/domain.com/www/subdomain/index.php on line 17
如您所见,路径中的子域翻了一番。是什么原因造成的?
提前致谢!
【问题讨论】:
标签: wordpress .htaccess mod-rewrite rewrite subdomain