regex - Exclude thumb folder from url RewriteRule with regular expression -


    rewriteengine on  rewriterule ^(.+)\.jpg$ watermark.php?image=$1\.jpg [l]  rewriterule ^(.+)\.gif$ watermark.php?image=$1\.gif [l]  rewriterule ^(.+)\.png$ watermark.php?image=$1\.png [l]  rewriterule ^(.+)\.bmp$ watermark.php?image=$1\.bmp [l] 

i want exclude thumbnails applying watermark:

http:// ... /gallery/photos/4db83e206ae00/4db83e559209e.jpg yes!

http:// ... /gallery/photos/4db83e206ae00/thumb/4db83e559209e.jpg no!

you can this:

rewritecond $1 !/thumb/ rewriterule ^(.+)\.(jpg|gif|png|bmp)$ watermark.php?image=$0 [l] 

Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -