访问非wordpress子目录

时间:2017-08-24 03:03:53

标签: wordpress .htaccess

我已经在我的根文件夹上创建了一个子文件夹以及wp install。文件夹是经理

然而,当我通过URL staging.domain.com/manager直接访问时,wordpress会将其丢弃到404页面。我已经摆弄了几个htaccess更改,到目前为止都有内部500错误。

# 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>

这也可能是服务器问题吗?阿帕奇可能吗?

1 个答案:

答案 0 :(得分:-2)

可以分两步完成

第1步:在你的root上创建index.php,其内容低于

&#13;
&#13;
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */

/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define('WP_USE_THEMES', true);

/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/manager/wp-blog-header.php' ); /** here manager is place as your folder name */
&#13;
&#13;
&#13;

第2步:现在更改&#34; staging.domain.com&#34;到&#34; staging.domain.com/manager"在你的数据库中(对于这个下载sql&gt;打开并编辑替换&gt;上传新的sql)。

现在您在staging.domain.com网址上运行完整网站,但文件是从&#34; manger&#34;文件夹中。