mod_rewrite Apache: erklären, mich% {HTTP_HOST} expecially wenn Addon-Domains mitApache mod_rewrite: erklären, mich% {HTTP_HOST} expecially wenn Addon-Domains mit
Situation (Verzeichnisse Baum) auf einem Apache-Server mit Addon-Domains:
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/)
sagen wir mal in "addon-domain-1.com/.htaccess" Datei habe ich einige Regel% mit {} HTTP_HOST wie:
RewriteCond %{HTTP_HOST} ^something$
Does %{HTTP_HOST}
wertet die Domain der aktuell angeforderten URL auf dem Server aus ???
Also, wenn fragt nach:
%{HTTP_HOST} will be "addon-domain-1.com"?
http://addon-domain-1.com (ohne abschließenden Schrägstrich)
%{HTTP_HOST} will still be "addon-domain-1.com"?
%{HTTP_HOST} will still be "www.addon-domain-1.com"?
Und wenn fragt nach:
http://main-domain.com/addon-domain-1.com
%{HTTP_HOST} will be "main-domain.com"???
or "main-domain.com/addon-domain-1.com"???