I am trying to amend my nginx config to redirect from the web root ("/") to /dir-a and then if this returns a 404 redirect to /dir-b. I'm not entirely sure how or if this is possible though.
This is what I have so far...
location = / {
rewrite "/" /dir-a permanent;
}
But this returns the 404 page so I'm not sure where to go from here. I need it to try dir-b instead.
error_page 404
. See the documentation here. – Richard Smith Feb 16 '17 at 14:42