apache - .htaccess 302 redirect url with php parametr to other website -


can tell me if gonna work correctly ?

i need redirect 302 webpages:
http://www.mysite.domain.net/?click=url
http://www.mysite.domain.net/?url=anotherurl&version=1&reflink=base

to webpage http:// othersite.otherdomain.com

rewriteengine on     rewritecond %{query_string} ^(.*&)?click=url$     rewritecond %{query_string} ^(.*&)?url=program&version=1&reflink=base      rewriterule ^$http://othersite.otherdomain.com [l, nc]    

  • you need have [or] beween rewritecond lines.
  • your syntax of rewriterule wrong.
  • space before r flag cause 500.

try rule:

rewriteengine on  rewritecond %{query_string} (^|&)click=url(&|$) [or] rewritecond %{query_string} (^|&)url=program&version=1&reflink=base(&|$) rewriterule ^/?$ http://othersite.otherdomain.com/? [l,nc,r=302]    

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -