1

I'm working on a client app and im using the Slim framework. the root of the site is a wordpress page

and my app stuff is under http://example.com/yumninja_app_1_0/api/

when you go to the url, it returns a 404, but the 404 is from the wordpress page.

the htaccess file on the root is:

<IfModule mod_rewrite.c>
RewriteEngine On
 RewriteBase /
 RewriteRule ^index\.php$ - [L]
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule . /index.php [L]
 </IfModule>

and the htaccess inside my folder (yumninja_app_1_0/api/) is

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]

My question is how to exclude a folder from mod_rewrite?

4

1 回答 1

2

在 RewriteRule 之前添加这一行

RewriteCond %{REQUEST_URI} !^/(yumninja_app_1_0|yumninja_app_1_0/.*)$
于 2012-09-08T21:41:40.347 回答