« Htaccess » : différence entre les versions
Aucun résumé des modifications |
Aucun résumé des modifications |
||
| (3 versions intermédiaires par le même utilisateur non affichées) | |||
| Ligne 1 : | Ligne 1 : | ||
== rediriger un sous-dossiers d'un domaine vers un sous domaine == | == rediriger un sous-dossiers d'un domaine vers un sous domaine == | ||
exemple.com/test -> test.exemple.com | exemple.com/test -> test.exemple.com | ||
<syntaxhighlight lang="apache" line> | |||
RewriteEngine on | RewriteEngine on | ||
RewriteCond %{REQUEST_URI} /(.+)/ | RewriteCond %{REQUEST_URI} /(.+)/ | ||
RewriteRule .* http://%1.exemple.com | 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: | [[category:Linux]] [[category:Apache]] [[category:Dev]] | ||