![]() |
|
Home | Keep up with the news | The Photo FX tour | Photo FX |
|
|
|
#1 |
|
VIG, Project Manager
Join Date: Aug 2004
Location: US of A
Posts: 1,861
|
If you have files on your server which people are not allowed to download from a third party website, setting up an .htaccess file can easily block servers from hotlinking. The example below will show you how.
Open up you default text editor such as Notepad and add the following lines. Code:
This code will switch on the mod_rewrite engine and setup the referer which allows people to download files when visiting your site, but does not allow any third party domain to hotlink to any zip, rar, gz or exe files. If you own another server or if you a partnering with another web site, you can allow these to dowload files from your server. To do this just add the following HTTP_REFERER to your .htaccess file as I did below. Code:
If you are using Notepad, make sure before you save the file as .htaccess that you have selected All files where it says Save as type. Now you can upload the .htaccess file to any folder on your server, just keep in mind that the folder you upload your .htaccess file to, that all subfolders within that folder will be affected by this rule.
__________________
Project manager Visualizer Image Group "Don't judge yourself on how far you have come, It's better to get somewhere than nowhere" |
|
|
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Feb 2006
Posts: 17
|
Just a quick note, the .htaccess file does not work on Windows-based servers. In this case, settings like this can be configured directly in IIS. See the current Microsoft Developer website for more info, as the instructions are different for each version. I can't give you a direct link to the Microsoft Developer website, as they keep changing it, but it is accessible from the complex menus on http://www.microsoft.com . Don't expect user-friendly guides, though; Microsoft is QUITE well-known for their website's ease of use (sarcasm implied). No offense meant to anyone.
__________________
![]() Techsoft Advanced Administrator
|
|
|
|
|
|
#3 |
|
VIG, Project Manager
Join Date: Aug 2004
Location: US of A
Posts: 1,861
|
Very true, I forgot to mention that it was intended for Unix servers. Thanks for pointing out my missing details supertech1
![]()
__________________
Project manager Visualizer Image Group "Don't judge yourself on how far you have come, It's better to get somewhere than nowhere" |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|