Dmytro Zarezenko
Dmytro Zarezenko

Reputation: 10686

.htaccess exception for one folder

I have this one .htaccess:

RewriteEngine on
RewriteCond %{request_filename} -f
RewriteRule ^(.*) $1 [L]
RewriteRule ^(([^/]*)+)(/([^/]{0,32})(/.+)?)?$  index.php?a=$1&q=$3    [L]

Now I want to upload separate scripts to the beta/ folder, what I must change in .htaccess for right working script in beta/ folder separately?

Upvotes: 0

Views: 28

Answers (2)

Marcin Orlowski
Marcin Orlowski

Reputation: 75629

The simplest approach would be to create another .htaccess and put it your beta/ folder. It'd then can override what's "parent" .htaccess set.

Upvotes: 1

Croises
Croises

Reputation: 18671

You can use:

RewriteEngine on
RewriteCond %{request_filename} -f
RewriteRule ^ - [L]
RewriteCond %{REQUEST_URI} !^/beta/ [NC]
RewriteRule ^(([^/]*)+)(/([^/]{0,32})(/.+)?)?$  index.php?a=$1&q=$3    [L]

Upvotes: 1

Related Questions