Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I wanna check my url's and return "200 Response code" when the "CODE" parameter is "000000000000"

for example for this request:


must return 200 and for this requested URL:


nothing need to do!

here my config in nginx.conf by debian base linux:

location ~ /forgotten/verify {
        if ($arg_code = "000000000000") {
            return 200;

but it dont works well!what should i change in my config code?

share|improve this question

1 Answer 1

Your code is ok and works. Maybe your configuration rewrites the location before reaching your location statement?

share|improve this answer
thnx for your reply michy! no when I use this location it will done for all of "/forgotten/verify" requests that come to server!I mean that if wont work well and work with all of requests that have diffrent "code parameters" –  m mov Nov 5 '12 at 12:19
any other suggestions guys..? –  m mov Nov 17 '12 at 5:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.