LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  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.

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
 
Old 10-22-2007, 04:51 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

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

not sure but maybe...
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:58 AM.

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