【发布时间】:2016-10-03 23:09:15
【问题描述】:
我正在为一个客户开发一个应用程序,他们有一个网站,上面有几个 wordpress 博客 http://www.chasethepaper.com
在根目录下,htaccess文件是
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/(yumninja_app_1_0|yumninja_app_1_0/.*)$
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
在根目录下,我有一个名为
的文件夹'yumninja_app_1_0'
在“ap”文件夹中,我有一个带有
的 htaccess如果你去 http://chasethepaper.com/yumninja_app_1_0/api/
它显示了索引页面,这是正确的 但是,如果你去
http://chasethepaper.com/yumninja_app_1_0/api/getReviews 它返回 wordpress 404
这里是 api 文件夹中的 htaccess 文件
RewriteEngine On
# Some hosts may require you to use the `RewriteBase` directive.
# If you need to use the `RewriteBase` directive, it should be the
# absolute physical path to the directory that contains this htaccess filwe.
#
# RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/(yumninja_app_1_0|yumninja_app_1_0/.*)$
RewriteRule ^(.*)$ index.php [QSA,L]
<IfModule Mod_php.c>
php_value upload_max_filesize 10M
php_value post_max_size 20M
php_value memory_limit 32M
</IfModule>
我真的不知道为什么这不起作用。那是几天前。我知道 /getReviews 是有效的,因为我将相同的文件夹结构复制到另一台服务器并且它工作正常 http://javadash.com/yumninja_app_1_0/api/getReviews
【问题讨论】: