.htaccess Exclude specific file/directory

Discussion in 'Apache' started by Python, Jun 14, 2009.

  1. #1
    Hi, I have the following...

    Basically... This redirects example.com/* to myfile.php?g=*
    And it works fine

    But I need to put in another rewrite condition so that it will not redirect anything from my image directory (example.com/misc/images/).

    Any help would be much appreciated.

    Thanks
     
    Python, Jun 14, 2009 IP
  2. sgtcory

    sgtcory Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This should work :

    RewriteCond %{REQUEST_URI} !^/misc/images(/.*)?$ [NC]

    Needs to go before the rules you don't want processed.
     
    sgtcory, Jun 14, 2009 IP
  3. romanos8

    romanos8 Peon

    Messages:
    112
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I have a htaccess in my root and I have other domain (addon) in this root , now the htaccess is afecting to the other domain,can I exclude the domain(addon) in the htaccess?

    Sorry ,my english is a little bad
     
    romanos8, May 9, 2010 IP