# BEGIN wccp_pro_image_protection
<FilesMatch "watermark.php">
Allow from all
</FilesMatch>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_COOKIE} (excludethispage)
RewriteRule ^(.*)\.(jpg|png|jpeg|gif|webp)$ - [NC,L]
RewriteCond %{QUERY_STRING} (wccp_pro_watermark_pass) [NC,OR]
RewriteCond %{REQUEST_URI} (wp-content/plugins) [NC,OR]
RewriteCond %{REQUEST_URI} (wp-content/themes) [NC,OR]
RewriteCond %{REQUEST_URI} (logo|150x150) [NC,OR]
RewriteCond %{REQUEST_URI} (this_is_just_not_any_wanted_image_size) [NC]
RewriteRule ^(.*)\.(jpg|png|jpeg|gif|webp)$ - [NC,L]
# What happen to images on my site
#RewriteCond %{HTTP_ACCEPT} (image|png|webp) [NC]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?com.sg [NC,OR]
RewriteCond %{HTTP_REFERER} ^(.*)com.sg [NC]
RewriteRule ^.*$ - [NC,L]
#Save as or Click on View image after right click or without any referer
RewriteCond %{HTTP_ACCEPT} (text|html|application|image|png|webp) [NC]
RewriteRule ^.*$ - [NC,L]
RewriteCond %{REQUEST_URI} \.(jpg|jpeg|png)$ [NC]
RewriteCond %{REMOTE_ADDR} !^(127.0.0.1|162.144.5.62)$ [NC]
RewriteCond %{REMOTE_ADDR} !^66.6.(32|33|36|44|45|46|40). [NC]
RewriteCond %{HTTP_USER_AGENT} !(this_is_just_not_any_wanted_service_name) [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?(this_is_just_not_any_wanted_service_name) [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?(www.com.sg|com.sg|pinterest.com|tumblr.com|facebook.com|plus.google|twitter.com|Twitterbot|googleapis.com|googleusercontent.com|ytimg.com|gstatic.com) [NC]
RewriteCond %{HTTP_USER_AGENT} !(linkedin.com|LinkedInBot|WhatsApp|googlebot|msnbot|baiduspider|slurp|webcrawler|teoma|photon|facebookexternalhit|facebookplatform|pinterest|feedfetcher|ggpht) [NC]
RewriteCond %{HTTP_USER_AGENT} !(photon|smush.it|akamai|cloudfront|netdna|bitgravity|maxcdn|edgecast|limelight|tineye) [NC]
RewriteCond %{HTTP_USER_AGENT} !(developers|gstatic|googleapis|googleusercontent|google|ytimg) [NC]
RewriteRule ^.*$ - [NC,L]
</ifModule>
# END wccp_pro_image_protection