Hello!
I have to change a mod-rewrite rule from a server where Mambo CMS is installed. The default htaccess is this one:
Code:
##
Redirect Permanent /home http://www.domain.com
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com
RewriteRule ^(.*)$ http://www.domain.com/$1 [r=301,L]
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update YourMamboDirectory (just / for root)
# RewriteBase /YourMamboDirectory
#
# Rules
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php
I set up a new directory called "test", in it is another htaccess file that rewrites the URL for a page with US states. The htaccess file in "test" is this:
Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(AK|AL|AR|AS|AZ|CA|CO|CT|DC|DE|FL|FM|GA|GU|HI|IA|ID|IL|IN|KS|KY|LA|MA|MD|ME|MH|MI|MN|MO|MP|MS|MT|NC|ND|NE|NH|NJ|NM|NV|NY|OH|OK|OR|PA|PR|PW|RI|SC|SD|TN|TX|UT|VA|VI|VT|WA|WI|WV|WY)/([^/]*)/?([^/]*)/?([0-9]*)/?([^/]*)/?([^/]*)/?$ index.php?state=$1&cityprefix=$2&city=$3&zip=$4&category=$5&subcategory=$6 [L]
But when I go now to
http://www.domain.com/test/ or
http://www.domain.com/test/index.php or whatever it does not allow me to run the file because it somehow handels the directory as one of the root Mambo files.
My question is now, how to I change the first htaccess file so it rewrites the URL only if it is NOT "test", or to let me run "test" directory and ignoring the other rules.
Thank you!
Kind regards, Boby.