PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > alt.apache.configuration > Prevent Hot Linking With .htaccess
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
alt.apache.configuration Apache web server configuration issues.

Prevent Hot Linking With .htaccess

Réponse
 
LinkBack Outils de la discussion
Vieux 08/05/2007, 16h44   #1
EdwardATeller
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Prevent Hot Linking With .htaccess

>From this link:

http://www.javascriptkit.com/howto/htaccess10.shtml

I learned that I could prevent hot linking with this code:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule \.(gif|jpg|js|css)$ - [F]

in my .htaccess file.

The only problem is that it doesn't work. I replaced mydomain.com
with the proper domain, but I am still able to hot link images from
another domain I have. The .htaccess file is in the directory
containing the images I don't want hot linked.

If there is something simple to try, I'd love to hear it. The website
is hosted on a GoDaddy shared-hosting Linux server, Apache version
1.3.33.

Also, if some kind soul wanted to explain what the syntax of the code
is or point me to a reference that does, that would be much
appreciated.

  Réponse avec citation
Vieux 09/05/2007, 14h59   #2
EdwardATeller
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Prevent Hot Linking With .htaccess

On May 8, 11:44 am, EdwardATeller <sorry_no_em...@yahoo.com> wrote:
> >From this link:

>
> http://www.javascriptkit.com/howto/htaccess10.shtml
>
> I learned that I could prevent hot linking with this code:
>
> RewriteEngine on
> RewriteCond %{HTTP_REFERER} !^$
> RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
> RewriteRule \.(gif|jpg|js|css)$ - [F]
>
> in my .htaccess file.
>
> The only problem is that it doesn't work. I replaced mydomain.com
> with the proper domain, but I am still able to hot link images from
> another domain I have. The .htaccess file is in the directory
> containing the images I don't want hot linked.
>
> If there is something simple to try, I'd love to hear it. The website
> is hosted on a GoDaddy shared-hosting Linux server, Apache version
> 1.3.33.
>
> Also, if some kind soul wanted to explain what the syntax of the code
> is or point me to a reference that does, that would be much
> appreciated.


Any thoughts on this?

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 18h43.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,13406 seconds with 10 queries