help needed : catch a url and use in a location block

ender ulusoy enderulusoy at
Tue Jan 8 10:47:39 UTC 2019

Hello everyone,

I have a website I just want to cache only pages includes

I'm using NGINX as a reverse proxy and 3 servers behind NGINX (Apache).

An example URL is here:

I won't use cache on other pages. And I don't want to use an if condition
because this page gets high traffic. How can I achieve that? What will be
the right regex to catch this URL as a location block?

I've tried some regex but can not catch the URL contains adv_id with the
given URL format.

location ~* ^/(adv_id) {}

Doesn't work for example.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list