tags:

views:

29

answers:

1

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

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

location (need regex){
deny all;
}
+2  A: 

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

Ofir
why use the "^"? \? should work, no?
Sylverdrag
@Sylverdrag - right
Ofir