simple .htaccess redirect : how to redirect with parameters?

前端 未结 3 1924
醉梦人生
醉梦人生 2021-01-03 03:22

My goal is simply to redirect:

/jsn.php?parameters to http://www.site2.com/jsn.php?parameters

I tried with

Redirec         


        
3条回答
  •  清歌不尽
    2021-01-03 03:37

    Query string parameters are automatically passed, you simply want to do this:

    Redirect permanent /jsn.php http://www.site2.com/jsn.php
    

    The (.)* doesn't work with the Redirect directive, you were probably thinking of RedirectMatch, but either way, you don't need it. And also (.)* should be (.*), otherwise the $1 backreference would only get the first character.

提交回复
热议问题