LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Mod_rewrite exclude directory (https://www.linuxquestions.org/questions/linux-server-73/mod_rewrite-exclude-directory-593576/)

Albin Joseph 10-21-2007 11:28 PM

Mod_rewrite exclude directory
 
How can I exclude one directory from mod_rewrite?

Following is the contents of my .htaccess file.

Code:

<IfModule mod_rewrite.c>
  RewriteEngine on

  RewriteBase /

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

I have a directory with name 'abc' in my document root. Whenever I access this directory my server is returning me the 404 error message. If I turn off the mod_rewrite I am able to access this directory.

Please help
Thanks
-Albin

j-ray 10-22-2007 04:51 AM

RewriteCond /your/docroot/abc/%{REQUEST_FILENAME} -f
RewriteRule ^(.+) /your/docroot/abc/$1 [L]

not sure but maybe...


All times are GMT -5. The time now is 08:55 PM.