どのように機能するか
- フロントエンドの開始ページは
http://server/apex/
- デッド ページです - 作業ページにリダイレクトし、
to /apex/f?p=100:4:0::NO:::
- きれいな URL タイプを作る
http://server/apex/4/0/NO
location / {
proxy_pass http://127.0.0.1:8080;
include /etc/nginx/reverse_proxy.conf;
rewrite ^/$ /apex/f?p=100:4:0::NO:::? permanent;
}
location /apex {
proxy_pass http://127.0.0.1:8080;
include /etc/nginx/reverse_proxy.conf;
if ($args ~ "p=100:(.*):(.*)::(.*):::") {
set $args $1/$2/$3/$4;
rewrite ^/[a-z]+/.+ /apex/$args?;
}
}
nginx からのログ - access.log "
GET / HTTP/1.1" 301 178 "-"
"GET /apex/f?p=100:4:0::NO::: HTTP/1.1" 404 5
エラーログから (デバッグ)
[notice] 27639#0: *3 "^/$" matches "/", client: 222.222.222.222, server: server, request: "GET / HTTP/1.1", host: "server"
[notice] 27639#0: *3 rewritten redirect: "/apex/f?p=100:4:0::NO:::", client: 222.222.222.222, server: server, request: "GET / HTTP/1.1", host: "server"
[notice] 27639#0: *3 "p=100:(.*):(.*)::(.*):::" matches "p=100:4:0::NO:::", client: 222.222.222.222, server: server, request: "GET /apex/f?p=100:4:0::NO::: HTTP/1.1", host: "server"
[notice] 27639#0: *3 "^/[a-z]+/.+" matches "/apex/f", client: 222.222.222.222, server: server, request: "GET /apex/f?p=100:4:0::NO::: HTTP/1.1", host: "server"
[notice] 27639#0: *3 rewritten data: "/apex/4/0/NO", args: "", client: 222.222.222.222, server: server, request: "GET /apex/f?p=100:4:0::NO::: HTTP/1.1", host: "server"
[notice] 27639#0: *3 "p=100:(.*):(.*)::(.*):::" does not match "", client: 222.222.222.222, server: server, request: "GET /apex/f?p=100:4:0::NO::: HTTP/1.1", host: "server"
私は何を間違っていますか?