Bee
Bee

Reputation: 11

deny access to URL- nginx regex

What regex would I use to deny every URL using "?":

Ex. domain.com/? and domain.com/?p=1224

location (need regex){
deny all;
}

Upvotes: 1

Views: 1634

Answers (1)

Ofir
Ofir

Reputation: 8362

I believe \? would do what you want, ^\? is the reverse expression.

Upvotes: 2

Related Questions