Images from a database...

New to mod_rewrite? This is a good place to start.

Images from a database...

Postby Barry » Thu Oct 16, 2003 1:51 am

A bit of server info will probly help first.. :D

here is my current set of rules:

****************************************
Options +FollowSymlinks


RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://localhost/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://mydomain.co.uk/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mydomain.co.uk/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://myserverip/.*$ [NC]
RewriteRule .*\.(jpg|JPG|jpeg|JPEG|png|PNG|mov|MOV|mpg|MPG|mpeg|MPEG|mp3|MP3|asf|ASF|wma|WMA|wmv|WMV).*$ http://www.mydomain.co.uk/theft.htm [R,L]

****************************************
(i know gif anit in there, some banners are served from the account :wink: )

right.. you can see what im trying to achive by that hopefully :biggrin:

i still have a problem tho, some images are pulled directly out of a mysql database, so they dont have a extention..

they show simply as:
http://www.mydomain.co.uk/show_image.php?id=268
http://www.mydomain.co.uk/show_image.php?id=269
http://www.mydomain.co.uk/show_image.php?id=270
etc, etc, etc

now is there anyway i can block these too without killing access to the rest of the site..? :confused:

preferibly it would show a image insteda my theft.htm page in the place of any pictures and the theft.htm page for the video files :-?

any and all help welcome :D
Barry
 

handy

Postby barry » Thu Oct 16, 2003 2:28 am

oh i almost forgot.. this may come in hand for a lot of you http://www.htmlbasix.com/disablehotlinking.shtml :P
barry
 


Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 71 guests

cron