hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Web Design and Content : Web Design and Content Tutorials : Disable Hot-linking Files
Reply

Web Design and Content Tutorials Tutorials on web design and content.
Forum Jump

Disable Hot-linking Files

Reply Post New Thread In Web Design and Content Tutorials Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 04-23-2012, 02:40 PM
wordgeist wordgeist is offline
Junior Guru Wannabe
 
Join Date: Apr 2010
Posts: 73

Disable Hot-linking Files


Hi,

I'm using the following lines on my .htaccess:

RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp|txt|pdf)$ - [F,NC]


I'm using this lines to avoid links to a files from external websites but how can I redirect that traffic to the index of the website or any other page?

Reply With Quote


Sponsored Links
  #2  
Old 04-23-2012, 02:57 PM
Loon Loon is online now
Community Liaison
 
Join Date: Apr 2003
Location: London, UK
Posts: 3,049
Edit your last line to point wherever, something like;

Code:
RewriteRule \.(gif|jpe?g|bmp|txt|pdf)$ /folder/page.php [L,NC]
PS - wrong section

Reply With Quote
  #3  
Old 04-23-2012, 03:14 PM
paraiba paraiba is offline
WHT Addict
 
Join Date: Sep 2011
Posts: 127
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ - [F,NC]

Reply With Quote
Sponsored Links
  #4  
Old 01-15-2013, 07:38 PM
KettleBoiling KettleBoiling is offline
Junior Guru Wannabe
 
Join Date: Jan 2013
Posts: 44
Why would you want to disable hot linking? As far as I can tell...at least at the time of writing, a hot linked image is beneficial in comparison to it being hosted. I believe that images that are hosted on other websites gives some "value" back in terms of SEO value.

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
How-to - Disable Hot-linking Files. MjrGaelic Web Design and Content Tutorials 17 05-26-2010 09:23 PM
Disable Hot Linking on a Server Level tommyd Dedicated Server 4 05-18-2005 06:48 AM

Related posts from TheWhir.com
Title Type Date Posted
Malwarebytes Launches Data Scan-and-Backup Service Web Hosting News 2013-05-07 14:51:03
Google Drive Adds File Hosting, Improves Third-Party App Integration Web Hosting News 2013-02-08 12:46:31
Google Plans to Disable Online Revocation Checks in Future Chrome Versions Web Hosting News 2012-02-09 13:26:57
Web Host Hosting Ireland Launches Online Backup Service CloudBox Web Hosting News 2011-09-27 20:00:52
Browsers Disable DigiNotar After Rogue Certificate Used in Gmail Attack Web Hosting News 2011-08-30 14:20:17


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 On
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?