« Htaccess » : différence entre les versions

 
Aucun résumé des modifications
 
(4 versions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
[[category:linux]] [[category:apache]] [[category:web]]
== rediriger un sous-dossiers d'un domaine vers un sous domaine ==
exemple.com/test -> test.exemple.com
<syntaxhighlight lang="apache" line>
RewriteEngine on
RewriteCond %{REQUEST_URI} /(.+)/
RewriteRule .* http://%1.exemple.com
</syntaxhighlight>
 
== Protection répertoire ==
Créer un htpasswd dans un répertoire "protect"
<syntaxhighlight lang="apache" line>
htpasswd -c .htpasswd geo -> en mode basic
htdigest -c .htpasswdprivatphp "PRIVATPHP" geo -> en mode digest
</syntaxhighlight>
 
[[category:Linux]] [[category:Apache]] [[category:Dev]]