Report this

What is the reason for this report?

nginx rule for wildcard url

Posted on February 16, 2016

Hello, I need to set some headers to all urls with certain scheme ie: http://domain.com/teenager-kills-abusive-stepfather/66585/

so i can read it something like this http://domain.com/*/*/

i have an if (I know if is evil) like this one:

if ($uri ~ "/php-fpm-status/") {
        set $bypass "true";
        add_header Something "value";
}

but in this case i need something like this:

if ($uri ~ "/*/*/") {
        set $bypass "true";
        add_header Something "value";
}

I really suck on regular expressions, so any help would be nice. or maybe a regular expressions dummy to regular tool/convertor link :D

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.