我想要使用 .htaccess 的带有查询字符串的 SEO 友好的 url,并在 php $_GET 变量中获取值
http://localhost/blog/categoryslug/postslug/?rf=1234&key=ad2312
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^blog/([0-9a-zA-Z-]+)/([0-9a-zA-Z-]+?)/?$ /blog/detail.php?cat_slug=$1&slug=$2 [L]
但是在print_r上,我只有2个键:
print_r($_GET); exit;
Array
(
[cat_slug] => categoryslug
[slug] => postslug
)
同时,我需要查询字符串中的所有键和值,如下所示:
Array
(
[cat_slug] => categoryslug
[slug] => postslug
[rf] => 1234
[key] => ad2312
)
请帮我解决这个问题
宝慕林4294392
慕哥6287543