Rewrite with apostrophe causes 404

st1905 nginx-forum at
Sun Aug 22 16:25:07 MSD 2010

I solved this myself, forgot to put the solution here, the following
removes /' and replaces it with nothing so urls work in all browsers.

if ($uri ~ "^(.*)/'(.*)$"){
	set $rule_0 1$rule_0;
	set $bref_1 $1;
	set $bref_2 $2;
if ($rule_0 = "1"){
	rewrite /. /$bref_1$bref_2 permanent;

Maybe this will help someone too.

Posted at Nginx Forum:,89455,122369#msg-122369

More information about the nginx mailing list