Exclude directory from rewrite

Hi I have a password protected directory named bestel in the root of CSCART.



If I want to access it with http://www.domain.com/bestel it gives me a 404



I tried excluding with

RewriteCond %{REQUEST_URI} !^/(bestel/.*)$

but did not work.



Anyone who has a solution to this problem?



Here's my .htaccess file:


```php DirectoryIndex index.html index.php



RewriteEngine on

Some hostings require RewriteBase to be uncommented

Example:

Your store url is http://www.yourcompany.com/store/cart

So “RewriteBase” should be:

RewriteBase /store/cart


RewriteBase /

RewriteCond %{REQUEST_FILENAME} !\.(png|gif|ico|swf|jpe?g|js|css)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php?sef_rewrite=1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} .*\/catalog\/.*
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteRule . index.php?sef_rewrite=1 [L,QSA]






SetOutputFilter DEFLATE




ExpiresActive On
ExpiresDefault "access plus 10 years"



RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*\.(js|css))$ smartoptimizer/?$1



RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*\.(js|css|html?|xml|txt))$ smartoptimizer/?$1




RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico))$ smartoptimizer/?$1



FileETag none

```

Where did you define the protection? You shouldn't need to do anything except for maybe ensuring that you are using /bestel/some_file.html (or php). I.e. the access to the directory should be caught/managed at a higher level then your .htaccess file (unless it's protected there). So you might need a file (versus a directory listing) for things to work properly.



Just my guess.

Yeah, this should work fine without any rewrite stuff. I have many sceripts located in folders in my root dir and they work fine.

Hi,



I tried to access: http://www.domain.com/bestel/file.php, but this gives me 404 too.



I have this .htaccess in my bestel folder:


AuthGroupFile /dev/null
AuthType Basic
AuthUserFile /home/admin/domains/domain.com/.htpasswd/public_html/bestel/.htpasswd
AuthName "Protected area"
require valid-user