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

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

Ansible warning on jinja2 braces on when -

html - How to custom Bootstrap grid height? -