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]
我想将缩略图排除在应用水印之外:
http:// ... /gallery/photos/4db83e206ae00/4db83e559209e.jpg 是!
http:// ... /gallery/photos/4db83e206ae00/thumb/4db83e559209e.jpg 不!
答案 0 :(得分:2)
你可以这样做:
RewriteCond $1 !/thumb/
RewriteRule ^(.+)\.(jpg|gif|png|bmp)$ watermark.php?image=$0 [L]