.htaccess rewrite to ignore files

Discussion in 'HTML & Website Design' started by bigpapa, Jan 14, 2008.

  1. #1
    I know this is simple, but I am just not getting the syntax exactly correct:

    In my .htaccess file, I have the following rewrite rule:

    RewriteRule ^(.+) watermark.php?img=$1 [L]
    Code (markup):
    This is to display a watermark whenever an image is accessed. This is working.

    All of the images have a corresponding thumbnail. For example:


    image01.jpg
    image01_thumb.jpg

    How to I write a rule to ignore any files with "_thumb" in the filename? I don't want a watermark to display on the thumbnails.

    Thanks!
     
    bigpapa, Jan 14, 2008 IP
  2. HiredAtHome

    HiredAtHome Peon

    Messages:
    188
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I know very little about MOD-REWRITE, but wouldn't it be possible to just put the thumbs in a separate folder, and avoid the problem completely?

    H@H
     
    HiredAtHome, Jan 14, 2008 IP