![]() |
|
|
#1 (permalink) |
|
Registered User
Join Date: Jul 2003
Location: West Midlands
Posts: 188
|
'.htaccess' file to prevent hot linking
Has anybody got a sample '.htaccess' file to prevent hot linking of images?
I'm using Pineapple if that makes any difference. I understand the file goes in the directory to be protected or in the root to protect all below. I also believe there is an option to direct a hot link to a URL of choice which I am interested in. I've read a bit about it but when I got to the bit where it says "All server configurations are different. What works for someone else's site might not work for yours. There are 7 different configuration options..." I thought it best to ask if anybody has sucessfully done it. |
|
|
|
|
|
#2 (permalink) |
|
Administrator
Join Date: Oct 2003
Posts: 1,484
|
.htaccess as far as I know is desgined for the apache web server not IIS. I dont know if there are other ways of doing such things for windows that will work with cat2 sort of programming your own access methods.
Jas
__________________
Jason Robbins jason@catalyst2.com |
|
|
|
|
|
#3 (permalink) |
|
Administrator
Join Date: May 2003
Posts: 1,299
|
One possible way of doing is by looking about where the user has come from - using the following code which tells you where the users has come from:
<%Request.ServerVariables("HTTP_REFERER")%> You could then say if it not from your site they can be sent to an error page. Regards, Jacob
__________________
Jacob Colton jacob@catalyst2.com Open a ticket | Knowledgebase | Rate catalyst2 | Review catalyst2 |
|
|
|
|
|
#4 (permalink) | |
|
Administrator
Join Date: Oct 2003
Posts: 1,484
|
Quote:
Jas
__________________
Jason Robbins jason@catalyst2.com |
|
|
|
|
|
|
#6 (permalink) |
|
Applications Developer
Join Date: Oct 2003
Location: Cheshire
Posts: 275
|
To save repeating whats already on the forum check here:
Image poacher die die die! Remember there is a search function guys!!! Tim Marshall |
|
|
|
|
|
#7 (permalink) |
|
Registered User
Join Date: Jul 2003
Location: West Midlands
Posts: 188
|
Thank you Tim.
But that thread doesn't answer my question, which is why I asked for help here in the 'New Users > How to?' section. Let's just step back a bit if we can. Do I assume correctly that a '.htaccess' file cannot be used on the server I'm using? If so, then end of request and I shall resign myself to the fact that bandwidth is being 'stolen'. If one can, then I shall continue in my search for a sample/default/template file for the purpose. |
|
|
|
|
|
#8 (permalink) |
|
Applications Developer
Join Date: Oct 2003
Location: Cheshire
Posts: 275
|
.htaaccess files are used on Windows servers for the secured folders so i assume (possibly incorrectly) that you can indeed use them...
Only way to know for sure is to give it a test. Tim Marshall |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|