URLに記事タイトルをエンコードしたいところにスラッシュが含まれているとします。 I URLは記事のタイトルをエンコードする場合、私は得る:むしろアイデアを台無しNGINXは%2fをスラッシュにエスケープしません。どうすればそれを止めることができますか?
http://example.com/articles/foo/bar/view/
:
http://example.com/articles/foo%2fbar/view/
は、nginxのは、私のようFastCGIアプリケーションにこれを渡します。しかし、これはそうではありません
http://example.com/path/to/page.html
http://example.com/path/to%2fpage.html
:
私はnginxのは、ファイルを提供している場合、/path/to/page.html、それは、次の2つのURLのいずれかによって到達することができると言うことに気付きます(例えば)Apache用。
この動作を修正する方法はありますか?
私は幸運にもドキュメントとGoogleを試しました。
ありがとうございました。
nginxの設定ファイル
UPDATE:
worker_processes 1;
pid ./nginx.pid;
events {
worker_connections 1024;
}
http {
server_tokens off;
server {
listen 80;
server_name localhost;
location /mysite/{
fastcgi_pass unix: ./mysite.fcgi.socket;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param SCRIPT_NAME "/mysite/";
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_pass_header Authorization;
fastcgi_intercept_errors off;
}
}
}
何あなたのnginxの設定がどのように見えるん2fは%に触れていないのだろうか? – Amber
も参照してくださいhttps://stackoverflow.com/a/37584637/873282 – koppor