Reputation: 23159
in my .htaccess
file i have the following
Options -Indexes
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)/(.*)$ index.php?lang=$1&id=$2 [L]
so when i wrote http://mydomain.com/am/home
it will be redirected to http://mydomain.com?lang=am&id=home
but i have a cms
folder, and i need to go to
http://mydomain.com/cms/index.php
when wrote
http://mydomain.com/cms
but it doesn't happen.
what can i do?
Thanks
Upvotes: 0
Views: 103
Reputation: 97845
Add a RewriteCond
:
RewriteCond $1 !=cms
RewriteRule ^(.*)/(.*)$ index.php?lang=$1&id=$2 [B,L]
When you go to /cms
, Apache probably does a 301 to /cms/
, therefore your rewrite rule would match. This will avoid matching /cms/
.
Upvotes: 1