2017-08-24 64 views
0

我已經在我的根文件夾和wp install上創建了一個子文件夾。文件夾是經理訪問非wordpress子目錄

但是,當我直接通過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> 

難道這也是一個服務器的問題? Apache可能?

+0

不太可能。你能向我們展示你用來訪問它的代碼和確切的URL嗎? – FluffyKitten

+0

它位於受限制的開發環境中。訪問將是http://staging.domain.com/manager和經理有一個index.php文件。 – iamTony

+0

這實際上並不是我的意思 - 你說WordPress給你一個404錯誤,所以我認爲你是從代碼鏈接到URL。然而,你的意思是說你不能直接訪問它,而這應該與WP無關。唯一連接到WP將是它添加到根的.htaccess,並罰款。 – FluffyKitten

回答

-1

它可以在兩步

第1步來完成:在你的根目錄中創建的index.php下面內容

<?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 */

第2步:現在改變「staging.domain .com「轉換爲」staging.domain.com/manager「(爲此下載sql>打開&編輯替換>上傳新的sql)。

現在,您可以在staging.domain.com網址上運行完整網站,但文件是從「manger」文件夾調用的。