search

Home  >  Q&A  >  body text

Judging based on args in nginx request, rewriting url problem

Hello, please ask about the jump issue:
When there is a request for the following URL

http://www.abc.cn/proxy?jump=http://ay.abc.cn/uopt/draw/index&code=123&_c=kuyin&state=3

If jump appears in the link, jump to the URL after jump=, as above, the result after rewriting is
http ://ay.abc.cn/uopt/draw/index&code=123&_c=kuyin&state=3

世界只因有你世界只因有你2757 days ago764

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-05-16 17:17:45

    nginx can do it. Just make sure $arg_jump is not empty and rewrite it. However, I also think it should not be done by nginx. There is a security issue. Is the jump address safe?

    reply
    0
  • 迷茫

    迷茫2017-05-16 17:17:45

    Isn’t it better and simpler to do this with code? . .

    reply
    0
  • Cancelreply