V
V
vpArtem2019-05-13 13:39:46
Nginx
vpArtem, 2019-05-13 13:39:46

How to prevent access to url in nginx by mask?

I want to prevent access in the nginx file to links like uk/404.php?c=L3NoL2FwaS8_dHlwZT02JmlkPTg0NA,,
I am writing

location ~ /uk/404.php?c=.*$ {
deny all;
}

But nothing happens.
Can you please tell me how to create a record

Answer the question

In order to leave comments, you need to log in

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

server {
    if ($request_uri ~ "^/uk/404\.php\?c=") {
        return 403;
    }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question