hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : hotlinking only server...
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

hotlinking only server...

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 04-23-2006, 07:45 AM
swfish swfish is offline
New Member
 
Join Date: Apr 2006
Posts: 3

hotlinking only server...


hey all,...i have posted this on other forums with null help.... and now i am going to try my luck here.
how would i go about config'ing an apache server (paid host) to only allow hotlinking?
i am trying to set it up so you could call files from the server, but could
not visit the server's domain.

eg:
you could view the files like so-

Code:
    <img src="htttp//mysite.com/file.gif" />
    or
    <embed src="htttp://mysite.com/file.swf"></embed>
but, if you visited 'mysite.com' or any directories, files from the site, it
would redirect you to another *site.

*i am able to host multiple domains on the same accout usind a drectory for
each domain.


Reply With Quote


Sponsored Links
  #2  
Old 04-23-2006, 04:44 PM
tamasrepus tamasrepus is offline
Web Hosting Master
 
Join Date: Dec 2004
Location: New York City, NY, USA
Posts: 735
The sureproof way that comes to my mind is to have a script processing requests. If HTTP_REFERRER is not set, redirect to another site. If it is, try to find and send the linked file.

__________________
Samat Jain | Rhombic Networks, LLC - Partner, CTO

Reply With Quote
  #3  
Old 04-23-2006, 06:51 PM
swfish swfish is offline
New Member
 
Join Date: Apr 2006
Posts: 3
i have been thinking about this and am not sure that it would work... lets say i googled 'mysite.com/file.gif' or, one could just make a link themselevs and then the HTTP_REFERER would be set...?

i will look into it more though.

thanks for the reply.

Reply With Quote
Sponsored Links
  #4  
Old 04-23-2006, 07:40 PM
tamasrepus tamasrepus is offline
Web Hosting Master
 
Join Date: Dec 2004
Location: New York City, NY, USA
Posts: 735
Yes, in both those situations what I described would be defeated.

However, with a robots.txt you can tell Google to not index your files.

Yes, someone could link to the image (or fake the header), but if you want the image to remain public access there isn't a way to get around it. You could do checking to on the HTTP_REFERRER variable to see if it's from an "allowed" location (say, your forum) and perform the redirect if the validation fails.

__________________
Samat Jain | Rhombic Networks, LLC - Partner, CTO

Reply With Quote
  #5  
Old 04-23-2006, 08:32 PM
swfish swfish is offline
New Member
 
Join Date: Apr 2006
Posts: 3
Quote:
Originally Posted by tamasrepus
You could do checking to on the HTTP_REFERRER variable to see if it's from an "allowed" location (say, your forum) and perform the redirect if the validation fails.
how would i go about doing this on file.gif or file.swf?

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
NetDNA Gives Site Managers Granular Control over Content with New EdgeRules Service Web Hosting News 2013-01-22 13:35:47
Web Host 1&1 Internet Adds Server Restoration Tool for Virtual Machines Web Hosting News 2012-11-07 15:45:16
Web Host OrcsWeb Offers Support for Windows Server 2012 Web Hosting News 2012-08-24 11:08:35
Web Host 1&1 Enhances Dedicated Server Line with 32 Core, 64 GB RAM Server Web Hosting News 2011-12-20 15:30:05
DiscountASP.NET Launches Free Beta for Microsoft SQL Server 2012 Hosting Web Hosting News 2011-12-13 22:02:03


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?