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

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -