PDA

View Full Version : .htaccess files and hotlink protection



Jupiter
09-16-2008, 04:35 AM
Would anyone know how to check the .htaccess files? I have been having problems with the hotlink protections on my sites for both the images and the rss feeds. They will work in the morning but at times stop working later in the day. When I call support they say it was because the hotlink protection was on, everything good now, and then later same issue again. thanks

Falcon1986
09-16-2008, 05:49 AM
The .htaccess is a hidden file usually located in the root of your web space. You will only be able to see it through the cPanel File Manager if you have the option to "view hidden files" selected or if you use FTP client software to manage files in your space. Just open it in a simple text editor and edit away!

You may find this link (http://www.htaccesstools.com/hotlink-protection/) helpful.

Jupiter
09-17-2008, 04:53 AM
thanks falcon

Jupiter
09-18-2008, 04:46 AM
how will I know there is hotlink protection; what am I looking for when I edit the file? thanks

Falcon1986
09-18-2008, 07:18 AM
The .htaccess statement you get from that generator (provided you followed the instructions) will allow hotlinking from your own domain name (or 'localhost' as the server sees it), but not from other domains.

When someone tries to link to the image from another domain it will fail to load on the web page on which it was posted. So say this is the path to an image on your website:


http://yourdomain.tld/images/example.jpg

...then someone decides to post the image on this forum using the proper vBulletin code as such:


{IMG]http://yourdomain.tld/images/example.jpg[/IMG}

(replace curly brackets with [ and ] respectively)

...it will fail to render in the forum thread because 'hostmonsterforum.com' is not your domain name.

Newnmn
10-13-2008, 11:01 PM
Is it work on FLV videos ????? I tried this, but movies not loading on my site, Any expert know this?

Falcon1986
10-14-2008, 07:06 AM
Did you use the .htaccess wizard to generate the proper statement as I mentioned before?

Did you ensure that your website's domain was included as an allowed referer?


RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]

Are the videos hosted in your Hostmonster webspace? Without the .htaccess edit, do the videos still load?

Newnmn
10-14-2008, 11:30 PM
Yes these Videos hosted on my hostmonster webspace, i tried hotlink protection but how to allow flv player, hot link protection block my videos on flv player, how to allow flv player (im using component AVR - All video Reloaded of joomla 1.5) :confused: