我正在尝试使用 HeliconTech ISAPI_Rewrite 版本 3 重写具有 2 个查询字符串参数的 URL。我能够使用 1 个参数重写 URL,但我无法弄清楚重写 2 的规则。
原网址:
http://example.com/index.php?id=1234&name=John-Edward-Smith
所需的重写 URL
http://example.com/id/1234/name/John-Edward-Smith
我当前的.htaccess:
RewriteEngine On
RewriteRule ^id/(.+)$ index.php?id=$1 [L, NC]
我当前的 .htaccess 文件成功地重写了第一个参数(id)。我的问题是如何修改规则或添加额外的规则来重写第二个参数(名称)?