|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Preventing hotlinking
Is there a way to prevent other websites from hotlinking to images on your server (i.e.: stealing bandwith), without causing (some) visitors of having problems visiting your website.
I already found the code below, but the disadvantage of this code is that your specifically have to specify what website you want to prevent from hotlinking (so I would preferably use another code that prevents any website from hotlinking.) Code:
RewriteCond %{REQUEST_FILENAME} .*jpg$|.*gif$|.*png$ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !yoursite\.com [NC]
RewriteCond %{HTTP_REFERER} !friendlysite\.com [NC]
RewriteCond %{HTTP_REFERER} !google\. [NC]
RewriteCond %{HTTP_REFERER} !search\?q=cache [NC]
RewriteRule (.*) /showpic.php?pic=$1
Now one question about this code; I remember to have read somewhere that some antivirus software or firewalls, among which Norton, prevent the visitor from passing through 'HTTP_REFERER', with as result that visitors using that software cannot access your website at all anymore. Is this true, and if so, is there a way to 'prevent' this? Thanks! |
|
#2
|
||||
|
||||
|
This is similar to the script I use to prevent access.
You're not specifying the domains to deny from access, you're specifying domains to allow access (basically yours plus google/yahoo images etc if you want them), so it's easy enough... Here's my version (in full): RewriteCond %{HTTP_REFERER} !^$ I put all my image files in one folder and install it there, so only (my own) server requests hit my image files (plus G&Y images bots); I've never had a problem with antivirus prog's preventing user access.
__________________
ClickyB "The quality of the visitor is more important than the volume".. Egol 22nd Feb 2008
New to SEO? Start Here: SEO FAQForum Rules & Posting Guidelines |
|
#3
|
|||
|
|||
|
Man that's a cool solution!
So I just put the above code in a .htaccess file which I place in my image folder? Why would I actually not want to put that .htaccess file in the main folder of my website? |
|
#4
|
||||
|
||||
|
Quote:
![]() If you want to put in in your root .htaccess and specify image file types (like your example) you need to make sure that any new image types are added to the rule and if you vary your filename case you need to cover that too... I just find this way much less complicated. |
|
#5
|
||||
|
||||
|
Some guy selling on ebay was hotlinking my images.... lots of them for an item that he had dozens of listings running continuously. I emailed him and he told me to F.. off...
So I waited until he had a ton of bids on these items and then switched my image to a text .gif that said.. PARTS MISSING - SOLD "AS IS" He quit hotlinking.
__________________
* Its not the size of the dog in the fight that matters... it's the size of the fight in the dog. * Free advice generally isn't worth much, but cheap advice is worth even less. |
|
#6
|
|||
|
|||
|
Ok, but now let's get back a little to the essence of my question; ;)
Do you think having other websites hotlinking (some of) your images is good for your SERPS because Google sees it as votes for your content, similarly as inbound text links? Or in other words, is preventing hotlinking bad for your rankings?? Thanks for your thoughts! |
|
#7
|
||||
|
||||
|
Quote:
Personally I don't want anyone stealing my BW, I'd rather get my votes from links. |
![]() |
| Viewing: SEO Chat Forums > Other > SEO Scripts > Preventing hotlinking |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|