V
V
vikholodov2019-03-13 15:58:30
Nginx
vikholodov, 2019-03-13 15:58:30

How to find statics with such filename?

There are requests of this kind on the site.
/omsu.base.js/?ver=2017.08.03
Filename seems to be an encoded path:
omsu.base.js%3fver%3d2017.08.03
How can nginx find and give these files?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2019-03-13
@dodo512

location ~ ^(?<path>.*omsu\.base\.js)/$ {
    try_files $path%3fver%3d$arg_ver =404;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question