I have the following url:
where 2015/10/pic.jpgis dynamic: 2015 is the year, 10 is the month number and pic.jpg a file name. Every time an image is sent, the year and month folders are created as the current date.
I would like to remove the node “dr” of the url, like the example below:
I found this question, which is the closest to what I need: http://superuser.com/questions/435916/nginx-rewrite-rule-to-remove-path-node
You could just add it to your
try_files. This is the simplest and will perform better than a
rewrite. For example:
try_files /dr$uri $uri ....the rest of it...
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.