Apache mod_rewrite:在使用插件域时特别向我解释 %{HTTP_HOST}
具有附加域的 Apache 服务器上的情况(目录树):
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/)
假设在“addon-domain-1.com/.htaccess”文件中,我有一些使用 %{HTTP_HOST} 的规则,例如:
RewriteCond %{HTTP_HOST} ^something$
是否%{HTTP_HOST}
评估服务器上当前请求的 url 的域???
因此,如果要求:
%{HTTP_HOST} will be "addon-domain-1.com"?
http://addon-domain-1.com(没有最后的斜线)
%{HTTP_HOST} will still be "addon-domain-1.com"?
%{HTTP_HOST} will still be "www.addon-domain-1.com"?
当要求:
http://main-domain.com/addon-domain-1.com
%{HTTP_HOST} will be "main-domain.com"???
or "main-domain.com/addon-domain-1.com"???