simple .htaccess redirect : how to redirect with parameters?

前端 未结 3 1916
醉梦人生
醉梦人生 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:58

    You can use an explicit URL rewrite in your .htaccess file:

    RewriteRule ^/jsn\.php\?(.*) http://www.site2.com/jsn.php?$1 [R]
    

    Note: You need to escape . and ? because they are also regular expression characters.

    If you have a problem using mod_rewrite, post the contents of your file.

提交回复
热议问题