catalyst2 community forums  

Go Back   catalyst2 community forums > New Users > How-To?

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 16-11-2004, 01:59 AM   #1 (permalink)
Registered User
 
Waldovia PM's Avatar
 
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.
Waldovia PM is offline   Reply With Quote
Old 16-11-2004, 09:26 AM   #2 (permalink)
Administrator
 
WhiskyFudge's Avatar
 
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
WhiskyFudge is offline   Reply With Quote
Old 16-11-2004, 04:43 PM   #3 (permalink)
Administrator
 
Jacob's Avatar
 
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 is offline   Reply With Quote
Old 16-11-2004, 05:05 PM   #4 (permalink)
Administrator
 
WhiskyFudge's Avatar
 
Join Date: Oct 2003
Posts: 1,484
Quote:
Originally Posted by Jacob
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")%>
That will only work if you serve up your images using something like ASP.

Jas
__________________
Jason Robbins
jason@catalyst2.com
WhiskyFudge is offline   Reply With Quote
Old 16-11-2004, 06:44 PM   #5 (permalink)
Software / Web Developer
 
Join Date: Jul 2004
Location: Nottinghamshire, England
Posts: 158
Send a message via MSN to DaveLegg
You could write a HTTPHandler or HTTPModule in asp.net to do this but it may be a bit over the top.
__________________
Dave Legg
www.dlpwd.co.uk
DaveLegg is offline   Reply With Quote
Old 16-11-2004, 07:01 PM   #6 (permalink)
Applications Developer
 
Tim Marshall's Avatar
 
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
Tim Marshall is offline   Reply With Quote
Old 16-11-2004, 07:23 PM   #7 (permalink)
Registered User
 
Waldovia PM's Avatar
 
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.
Waldovia PM is offline   Reply With Quote
Old 16-11-2004, 08:35 PM   #8 (permalink)
Applications Developer
 
Tim Marshall's Avatar
 
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
Tim Marshall is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 12:30 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.