自己搜索能力明明不算低,但是好多东西并不能快速找到还是好纠结;
.htaccess | nginx.conf | 说明 |
---|---|---|
%{REQUEST_SCHEME} | $scheme | http /https |
%{HTTP_HOST} | $host | 域名 / ip |
%{REQUEST_URI} | $request_uri | host/ 后边的部分 |
%{REQUEST_FILENAME} | $request_filename | 一般情况下好像有 uri 一样? |
%{QUERY_STRING} | $args | 查询字符串(? 后边的部分) |
$scheme://$host/
或%{REQUEST_SCHEME}://%{HTTP_HOST}/
可直接拼接出当前网址;
mod_rewrite 参考文档_Apache 中文文档:
https://www.apachehttpd.com/mod/mod_rewrite.html
Htaccess - THE Ultimate .htaccess tutorial with 100's of Examples:
https://www.askapache.com/htaccess/#Htaccess_Variables