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

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -