H
H
Hecktosaurus2021-05-11 15:23:39
Nginx
Hecktosaurus, 2021-05-11 15:23:39

Is it possible to remove one get parameter?

There are pages like www.site.com/?display=block&pagen=2&sort=asc
How to remove only display=block from such urls ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2021-05-11
@Hecktosaurus

if ($args ~ "^(|.*?&)display=block(?:$|&)(.*)") {
    return 301 $uri?$1$2;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question