RE: Hotlink Thread

DRE

Well-known member
I tried replying to a post but the thread got locked so I'll ask here.

How can this be done for a folder?

For instance, instead of doing this htaccess rule for the site root, can't I just put this .htaccess file inside a folder that's in the site? If I did, what would the rewrite rule look like? For instance, this code goes into the root. I would need it to go here: http://www.mysite.com/images/

Anthony Parsons said:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(. \.)?mysite\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://i.imgur.com/qX4w7.gif [L]
 
Put the .htaccess file in the folder you want it, it will work for that folder and any files / folders inside of it. So if you put it at /root, it will work for everything, if you put it in /root/images it will only work in that folder and any sub folder (like /root/images/smilies)
 
Put the .htaccess file in the folder you want it, it will work for that folder and any files / folders inside of it. So if you put it at /root, it will work for everything, if you put it in /root/images it will only work in that folder and any sub folder (like /root/images/smilies)
I understand that but what I mean is does the url change?

For instance, would it be this:

Code:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(. \.)?mysite\images\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://i.imgur.com/qX4w7.gif [L]
 
I need this because when I designed someone's site 2 years ago they never paid me back (nowadays I just ask for the money first).

Some of the images on their site are hosted on my server. I could simply just delete the images from my server and let that be the end of it.

Boring. I'd rather do it the way that other guy did it cause that was pretty cool.

Since the image from my site is showing as a background for their website, isn't that considered a hotlink?

Plus it's using my bandwidth. By implenting this htaccess in the subdirectory I would only be initiating that htaccess rewrite in that folder.
 
Due to installing MetaMirror, I want to turn off hotlinking. Gonna see who else does this with MetaMiror first because I don't know how it will effect it.
 
Top Bottom