2015-10-26 44 views
0

我已經安裝和Apache服務器WordPress上配置(我沒有這樣做,我不是在網站上的專家)。現在我上傳我的PHP應用程序,使根的結構是這樣的:WordPress的 - 該頁面無法找到

... 圖像0​​券(這是我的應用程序) 可溼性粉劑管理員 的wp-content WP-包括

當我輸入http://address.com/voucher/index.php到瀏覽器我得到的Wordpress錯誤,其中包含信息「糟糕!無法找到該頁面」。我不知道爲什麼它試圖通過Wordpress系統獲得我的憑證目錄,也許我應該設置一些設置(.htacces或者像這樣的smth)?

+0

無論是網站名稱還是屏幕截圖在這裏都有幫助 –

+0

理想情況下,該文件夾應顯示頁面。我認爲.htaccess有規則將所有請求重定向到根目錄。 –

+0

http://pastebin.com/EewebbZd其我的.htaccess – Lukas

回答

0

Wordpress安裝時使用重寫將所有請求重定向到默認情況下index.php。如果服務器上有其他dirs或文件,則必須在.htaccess規則中考慮它們。

修改您的.htaccess。以下是繞過您的憑證目錄的wordpress規則的示例規則。

#only allow the wordpress rules if it is not request /voucher. 
# BEGIN WordPress 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_URI} !^/voucher [NC] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L] 
</IfModule> 
# END WordPress 

或者你可以這樣做你的規則。

#if the request is for the voucher folder, do nothing and display the page 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteCond %{REQUEST_URI} ^/voucher [NC] 
RewriteRule^- [L] 

# BEGIN WordPress 
RewriteBase/
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L] 
# END WordPress 
</IfModule> 
+0

這是怎麼鍛鍊的? –