Hotlinking


#1

how can i hotlink w/o creating seperate lines for each subdomain.

here is what i got so far

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(www.)?mydomain.com [NC]
RewriteRule .(jpe?g|gif)$ - [F]

reports a 403 forbidden area… but do i have to write seperate lines for subdomains, or can I just use a * type of thing?


#2

Try this line. It indicates ones other than any subdomain of mydomain.com

RewriteCond %{HTTP_REFERER} !^(.+).mydomain.com/ [NC]


#3

thanks, i’ll give it a try and let you know.


#4

it didn’t work at all.

i figured it out on my own.

RewriteCond %{HTTP_REFERER} !^http://(.*.)?domain.com [NC]


#5

Perhaps not in your specific case. You probably have to figure a lot of stuff out on your own with a sunny disposition like that. Good thing you’re resourceful.