Welcome! Log In Create A New Profile

Advanced

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

ender ulusoy
January 08, 2019 05:50AM
Hello everyone,

I have a website www.example.com. I just want to cache only pages includes
adv_id.

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

An example URL is here:

https://www.example.com/campains/a4/search?page=1&criteria%5Badv_id%5D=2004

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.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

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

ender ulusoy January 08, 2019 05:50AM

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

Francis Daly January 08, 2019 03:28PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 289
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready