Static content and Front Controller pattern under same base URI

J.R. themadbeaker at gmail.com
Fri Oct 18 13:31:40 UTC 2019


> I'm not a big fan of the location that sets the 418 error_page to the
> @foo_front_controller named location, but I don't know of any other way
> to essentially do a "return @foo_front_controller".  Is there a better
> way?

Use "try_files" instead with a filename that will never exist (i.e.
underscore) so it will always end up going to the named location:

try_files _ @foo_front_controller;


More information about the nginx mailing list