【发布时间】:2016-06-15 09:54:38
【问题描述】:
所以我在网络服务器上设置了一个 WP 站点,使用子文件夹作为主页的根目录,但我无法让它工作。真正的根被锁定,所以我无法访问。
原始的.htaccess & index.html 文件位于ftp://ftp.example//web/ 我想在ftp://ftp.example//web/wp 中安装我的 WP。
首先我将 WP 中的常规设置更改为:
WordPress 地址(URL):http://www.example.com/wp
网站地址(URL):http://www.example.com
然后我将 index.php 和 htaccess 复制到 ftp://einstein.netureza.pt//web/
将 index.php 中的第 17 行 更改为 require( dirname( __FILE__ ) . 'wp/wp-blog-header.php' ); 并更新了 wp-admin 中的永久链接。
.htaccess 现在说:
## Default .htaccess file
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>
# END WordPress
当我转到我的网址 http://www.example.com 时,我得到了这个错误:
The strategy4change.eu page isn’t working
strategy4change.eu is currently unable to handle this request.
HTTP ERROR 500
但是,访问http://www.example.com/wp 有效。
【问题讨论】:
标签: php wordpress .htaccess subdirectory document-root