开发者

mod_rewrite handling extra GET variables

开发者 https://www.devze.com 2023-03-06 07:09 出处:网络
I have a mod rewrite rule for pagination of my content: RewriteRule ^content/page/([^/]*)$ /index.php?page=$1 [L]

I have a mod rewrite rule for pagination of my content:

RewriteRule ^content/page/([^/]*)$ /index.php?page=$1 [L]

However, I am also attempting to handle facebook connect, which will result in a url that looks like this:

http://content.local/page/2?session={"session_key"...

However, with my current rewrite rule, the session variable does not get passed along. How can I pass that variable in addition?开发者_如何学Go I would want to un-rewritten link to look something like /index.php?page=2&session={"session_key"...


Use the QSA flag like this:

RewriteRule ^content/page/([^/]*)$ /index.php?page=$1 [QSA,L]
0

精彩评论

暂无评论...
验证码 换一张
取 消