Excluding selected multiple folders in a RewriteCond

Discussion in 'Apache' started by procrastinator, Jun 26, 2007.

  1. #1
    RewriteEngine on
    RewriteCond %{REQUEST_URI} ^/images/thumbs/
    RewriteCond %{REQUEST_URI} ^/thumbs/
    RewriteRule .* - [L]
    Code (markup):
    Is the above valid ? , earier i had 1 folder , i added the 2nd one , but it doesnt work , maybe im messing up the syntax , not much familiar with .htaccess
     
    procrastinator, Jun 26, 2007 IP
  2. rodney88

    rodney88 Guest

    Messages:
    480
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Add the [OR] flag - at the moment it says
    "If the requested URI starts with /images/thumbs and starts with /thumbs/, stop rewriting."
    .. and obviously both conditions can never be satisfied together.

    RewriteEngine on
    RewriteCond %{REQUEST_URI} ^/images/thumbs/ [OR]
    RewriteCond %{REQUEST_URI} ^/thumbs/
    RewriteRule .* - [L]
     
    rodney88, Jun 27, 2007 IP
  3. procrastinator

    procrastinator Peon

    Messages:
    1,718
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks yet again for htaccess help , gonna try this out.
     
    procrastinator, Jun 27, 2007 IP