if set variable unfamiliar language

nerdgrind nginx-forum at nginx.us
Thu Dec 17 13:48:28 MSK 2009


I see http://wiki.nginx.org/NginxHttpRewriteModule now, but I am still unsure about how some of the logic works. For example the follow rewrite code block allows YOURLS to be properly used with Nginx, but I don't see how this flows logically.:


				if (!-f $request_filename){
					set $rule_0 1$rule_0;
				}
				if (!-d $request_filename){
					set $rule_0 2$rule_0;
				}
				if ($rule_0 = "21"){
				rewrite ^/([0-9a-z]+)/?$ /yourls-go.php?id=$1 last;
				}


Posted at Nginx Forum: http://forum.nginx.org/read.php?2,31203,31215#msg-31215




More information about the nginx mailing list