URL decode rewrite handling: + vs. %20
locojohn
nginx-forum at nginx.us
Mon Sep 5 10:58:56 UTC 2011
You can also use PCRE capturing inside virtual host configuration, to
capture both SCRIPT_FILENAME and PATH_INFO without URL encoding:
location ~ ^(?<SCRIPT_FILENAME>.+\.php)$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME
$document_root$SCRIPT_FILENAME;
fastcgi_pass ...;
}
location ~ ^(?<SCRIPT_FILENAME>.+\.php)(?<PATH_INFO>.+)$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME
$document_root$SCRIPT_FILENAME;
fastcgi_param PATH_INFO $PATH_INFO;
fastcgi_param PATH_TRANSLATED
$document_root$PATH_INFO;
fastcgi_pass phpfarm;
}
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,214668,214792#msg-214792
More information about the nginx
mailing list