apache redirect to redirectUrl in query string -


i have request like:

http://www.example.com/test?redirecturl=http://www.test.com

i want apache use redirecturl param , redirect http://www.test.com

the redirecturl may valid url. like:

http://www.test.com/a/b?x=1&y=2&url=some_encoded_url

how should config apache?

i have got answer myself:

  rewritemap unescape int:unescape    rewritecond %{query_string} url=(https?[^&\ ]+)   rewriterule ^/share ${unescape:%1} [r,l]    rewritecond %{query_string} url=((https?){0}[^&\ ]+)   rewriterule ^/share http://${unescape:%1} [r,l] 

Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -