Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 10-21-2007, 11:28 PM   #1
Albin Joseph
LQ Newbie
Registered: Jan 2007
Posts: 4

Rep: Reputation: 0
Mod_rewrite exclude directory

How can I exclude one directory from mod_rewrite?

Following is the contents of my .htaccess file.

 <IfModule mod_rewrite.c>
  RewriteEngine on

  RewriteBase /

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
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
Old 10-22-2007, 04:51 AM   #2
Senior Member
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,548

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

not sure but maybe...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
exclude directory with cp hampel Linux - Software 3 06-04-2009 11:59 AM
Solving RSYNC's rather poor directory-exclude ability? hockeyrink Linux - Software 4 08-18-2006 03:11 PM
tar --exclude=directory ampop Linux - Software 7 06-20-2006 01:12 AM
mod_rewrite, simple directory redirect? xconspirisist Linux - Software 3 12-20-2005 08:22 AM
exclude directory from find ebasi Linux - Software 8 07-17-2004 02:12 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:18 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration