URI re-mapping using try_files

mrtn nginx-forum at nginx.us
Thu Oct 11 21:22:54 UTC 2012


Hi Francis,

>I guess (without testing):
>
>if ($arg_para != data) { return 404; }
>
>inside that location{} would probably work

Hmm, I read on nginx website and elsewhere that if statement may not work
consistently within a location directive, and is generally discouraged.
Should I worry in this case?

>The above rewrite does that; but which html file should it look for here?
>
>/home/www/example/public/doc/one/two/two.html, or
>/home/www/example/public/doc/one/two/one/two.html?
>
>(As in: do you repeat everything after /public/doc, or do you repeat
>just the final after-slash part?)

I only want to repeat the final after-slash part, so any
'/public/doc/blahA/blahB' should only look for
'/public/doc/blahA/blahB/blahB.html'. Would that change anything in the
config proposed here?

Thanks again!


Mrtn

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



More information about the nginx mailing list