Htaccess
De BlaxWiki
Révision datée du 1 avril 2020 à 11:53 par 127.0.0.1 (discussion)
Générateur de .htaccess (rewrite rule, auth, page 404... ) : http://cooletips.de/htaccess/
Authentification login / mdp
AuthType Basic AuthName "Vous devez vous AuthTextUserFile users.txt AuthTextCrypt Off Require valid-user
Restriction sur l'ip
Deny from all Allow from 212.43.232.112/28 212.43.232.64/27
Redirection d url suivant l'ip
RewriteEngine On
# On n'est pas redirigé si on arrive avec l ip 217.174.199.139
RewriteCond %{REMOTE_HOST} !^217.174.199.139
# Les 2 pages de la redirection sont exlues de la redirection sinon ca tourne en boucle
RewriteCond %{THE_REQUEST} !/maintenance/index.htm [NC]
RewriteCond %{THE_REQUEST} !/maintenance/header_ol.jpg [NC]
RewriteRule .* https://40.89.132.152/maintenance/index.htm [R=302,L]
Restriction ip + login mdp
Order Deny,Allow Deny from all AuthName "Protected Area" AuthType Basic AuthUserFile /var/www/html/forum.ol.fr/.htpasswd Satisfy All require valid-user allow from 217.174.199.139 80.78.5.106 80.78.5.96/27 80.119.176.120 185.78.82.7 86.194.88.121
Authentification par base mysql
AuthType Basic AuthName "Authentification 3ZAX Demo" AuthMYSQL on AuthMySQL_Authoritative on AuthMYSQL_Host localhost AuthMYSQL_Username 3zax_sql_demo AuthMYSQL_Password passwd AuthMYSQL_DB 3zax_baz_00 AuthMySQL_Password_Table 3zax_demo_ftpuser AuthMySQL_Username_Field userid AuthMySQL_Password_Field passwd AuthMYSQL_Encrypted_Passwords off AuthName "private" AuthType Basic AuthBasicAuthoritative Off AuthUserFile /dev/null require valid-user