开发者

How to keep original parameters after url_rewrite?

开发者 https://www.devze.com 2022-12-10 03:18 出处:网络
I\'m now doing this: rewriterule开发者_如何转开发 ^jobs/([0-9]+)/.* job.php?id=$1 Which will erase parameters in jobs/1010/title?k=v

I'm now doing this:

 rewriterule开发者_如何转开发 ^jobs/([0-9]+)/.* job.php?id=$1

Which will erase parameters in jobs/1010/title?k=v

How to keep them?


More of a serverfault question, but... Append the [QSA] flag:

rewriterule ^jobs/([0-9]+)/.* job.php?id=$1 [QSA]

From the docs for RewriteRule:

'qsappend|QSA' (query string append)

This flag forces the rewrite engine to append a query string part of the substitution string to the existing string, instead of replacing it. Use this when you want to add more data to the query string via a rewrite rule.

0

精彩评论

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