This should be really easy to do but I’m hitting my head on the wall. If I get a request for http://www.mysite.com/mypath I want to serve the content of http://www.mysite.com/myotherpath/thisfile.html. How can I do this with an nginx config.
Share
Use rewrite directive within proper location block. So for example you have basic location which will handle all requests
You will need to add another block, which will do for you handling of specific path
Also for your server to think in that block that
thisfile.htmlis default you can usetry thisfile.htmldirectiveIt is all well explained on official page Official Nginx RewriteModule page