nginx重寫規則
nginx重寫規則
本人是一個新手,請教以下問題中$1$2的值從那傳送過來,分別代表什麼意思server {
listen 8080;
server_name www.a.cn www.b.cn www.c.cn .d.org .e.com f.com;
server_name_in_redirect off;
access_log /usr/local/nginx/logs/nginx/www.cn.access.log main;
error_log /usr/local/nginx/www.cn.error.log;
include proxy.conf;
expires 1d;
location /abc {
if ( -d $request_filename ) {
rewrite ^/(.*)([^/])$ http://$host/$1$2/ break;
}
index index.html;
root html;
}
location ~* ^/(aa|bb|cc) {
proxy_pass http://f.com;
break;
}
location ~* ^/.*\.apk {
root html;
}
請教:
location ~* ^/.*\.apk {
root html;
}
代表什麼意思
if ( -d $request_filename ) {
rewrite ^/(.*)([^/])$ http://$host/$1$2/ break;
}
代表什麼意思
《解決方案》
......................................