How to redirect to begins with "/admin" url redirect to /admin/index.html (single page app) and another pages redirect to /index.html (other single page app).
my nginx.conf is here
location / {
if ( $allowed = "deny" ) { return 403; }
try_files $uri /index.html;
}
location /admin {
alias /usr/share/nginx/html/admin;
}
this is working but multi level url redirect to 503 error.
sample: get /admin/questions/1 ->fail 503
sample: get /admin/questions -> fail 503
sample get /admin -> ok