2

I have a url which is similar to below

http://www.example.com/index.html?jeff=345kol&remove=ab67&test=tester123&ignore=78ujy

I want to remove "&remove" and "&ignore" arguments from the url and after removing its should like as below

http://www.example.com/index.html?jeff=345kol&test=tester123

Is it possible to implement it in Nginx ?

0

1 Answer 1

1

Yes, you can use rewrite, each argument is accessible via special attribute, for instance: $arg_jeff, $arg_remove:

location = /index.html {
  rewrite ^ http://www.example.com/index.html$is_args$arg_jeff&arg_test;
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.