小编bea*_*man的帖子

mod_rewrite之后的GET变量

我有一组符合以下htaccess规则的产品页面:

RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_URI} ^/([0-9]+)\-(.+)\.html
RewriteRule ^(.*)$ /product/index.php?prod=%1-%2 [L]
Run Code Online (Sandbox Code Playgroud)

将其重写为:example.com/123-1234.html.

我的问题是我不能再向页面传递额外的$ _GET变量 - IE:example.com/123-1234.html?coupon=something123.

有没有办法做到这一点?

php apache .htaccess mod-rewrite

2
推荐指数
1
解决办法
2032
查看次数

标签 统计

.htaccess ×1

apache ×1

mod-rewrite ×1

php ×1