Mod_rewrite and $_GET variables

前端 未结 2 641
无人共我
无人共我 2021-01-19 04:48

If I am mod_rewriting a URL from:

http://www.mysite.com/blog/this-is-my-title/1/

to

http://www.mysite.com/blog.php?title=this-is-my-title&id=1

2条回答
  •  情书的邮戳
    2021-01-19 05:46

    It's possible to append it, with the QSA (query string append) flag.

    RewriteEngine on
    RewriteRule {from-url} {to-url} [L,NC,QSA]
    

提交回复
热议问题