url rewriting - Nginx rewrite rule: Add subfolder to URI if not there -
hello i'm trying write nginx rewrite rule adds subdirectory url if it's missing. example, need http://example.com re-written (and redirected) http://example.com/legacy-app. can't seem find proper example this.
you can use rewrite directive, exact match location block efficient:
location = / { return 301 /legacy-app; } see this document more.
Comments
Post a Comment