Mod_rewrite

Mod_rewrite, ou la réécriture des URL “à la volée”

Le fichier .htaccess :

AuthName “Protected Area”
AuthType Basic
AuthUserFile /var/www/virtual/site.com/htdocs/repertoire/.htpasswd
require valid-user

AuthUserFile /home/login/.htpasswd
AuthGroupFile /dev/null
AuthName “Acces Restreint”
AuthType Basic

require valid-user

Protéger les images :

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.site.info/.*$ [NC]
ReWriteRule .*\.(gif|png|jpe?g)$ – [F]

Advertisements

~ by netlex on September 18, 2006.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: