scrupul0us Posted February 14, 2007 Share Posted February 14, 2007 Im surprised there isnt a sticky here for common usages Heres how to prevent image hotlinking... place this in a .htaccess file in your server root RewriteEngine on RewriteCond %{HTTP_REFERER} . #THIS WILL ALLOW GOOGLE RewriteCond %{HTTP_REFERER} !google\.com [NC] #THIS WILL ALLOW YOUR DOMAIN RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain\.com [NC] RewriteRule \.(jpe?g|gif|png|bmp)$ - [NC,F] #OPTIONAL REDIRECT TO A DIFF PAGE #RewriteRule (.*) /no_hotlinking.php?/$1 [R,NC,L] Link to comment https://forums.phpfreaks.com/topic/38425-common-mod_rewrite-usages/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.