1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

RE: Hotlink Thread

Discussion in 'Off Topic' started by DRE, Jun 23, 2012.

  1. DRE

    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/

  2. Sador

    Sador Well-Known Member

    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)
  3. DRE

    DRE Well-Known Member

    I understand that but what I mean is does the url change?

    For instance, would it be this:

    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]
  4. DRE

    DRE Well-Known Member

    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.
  5. DRE

    DRE Well-Known Member

    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.

Share This Page