2015-10-26 130 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

这是怎么锻炼的? –