Apache mod_rewrite: me expliquer% {HTTP_HOST} expecially lors de l'utilisation des domaines addonApache mod_rewrite: me expliquer% {HTTP_HOST} expecially lors de l'utilisation des domaines addon
Situation (répertoires d'arbres) sur un serveur Apache avec des domaines addon:
main-domain.com/
|
|_ .htaccess (just an empty file, no rule in here)
|_ index.html (shown when accessing http://main-domain.com)
|
|_ addon-domain-1.com/
| |
| |_ .htaccess
| |_ index.html (shown when accessing http://addon-domain-1.com or http://main-domain.com/addon-domain-1.com/)
|
|_ addon-domain-2.com/
|
|_ .htaccess
|_ index.html (shown when accessing http://addon-domain-2.com or http://main-domain.com/addon-domain-2.com/)
Disons que dans le fichier "addon-domain-1.com/.htaccess" J'ai une règle en utilisant% {HTTP_HOST} comme:
RewriteCond %{HTTP_HOST} ^something$
Est-ce %{HTTP_HOST}
évalue au domaine de l'URL actuellement demandée sur le serveur ???
Donc, si demander:
%{HTTP_HOST} will be "addon-domain-1.com"?
http://addon-domain-1.com (sans barre oblique finale)
%{HTTP_HOST} will still be "addon-domain-1.com"?
%{HTTP_HOST} will still be "www.addon-domain-1.com"?
Et lorsque vous demandez:
http://main-domain.com/addon-domain-1.com
%{HTTP_HOST} will be "main-domain.com"???
or "main-domain.com/addon-domain-1.com"???