In Nginx the correct url?
For example domain: mydomen.ru
You need to, if will meet in the url: /static/
For example: mydomen.ru/какой-то_текст1/static/какой-то_текст2
Cut: то_текст1
and the url looked like this: mydomen.ru/static/какой-то_текст2
PS. If the original mydomen.ru/static/какой-то_текст2 then to change anything it is not necessary.
And.. location /static/ is already used, so you need to not conflict.
1 answer
Find more questions by tags Nginx
If for bots - you'll be fine
rewrite ^(.*)/static/(.*) static/$2 last;
- marcus.Wel commented on June 10th 19 at 16:19No, the site is purely for me, i.e., outside the closed authorization. - toni26 commented on June 10th 19 at 16:22
In the end get a 404 error. But the url does not change! Probably not the put command.
PS. Can I have the rewrite module disabled, although by default it should be enabled. - toni26 commented on June 10th 19 at 16:25
rewrite ^(.+)/static/(.*) /static/$2 last;
Don't forget the first slash and don't need to rariteti if the url already starts with /static/. - annie_Pagac commented on June 10th 19 at 16:28