.html 后的 htaccess 变量不显示
如果有以下规则 RewriteRule ^userCP/([a-zA-Z]+).html /userCp.php?action=$1
我需要的是在 .html 之后以 .html?var1=asas 的形式捕获其他变量
我尝试过这个 RewriteRule ^userCP/([a-zA-Z]+)(\.html) /userCp.php?action=$1&vars=$2
但当然我花 2 美元得到的是.html
最终结果应该类似于 userCP/compose.html?id=1&return=0
if have the following ruleRewriteRule ^userCP/([a-zA-Z]+).html /userCp.php?action=$1
and what i need is to catch additional variables after the .html in the form of .html?var1=asas
i tried thisRewriteRule ^userCP/([a-zA-Z]+)(\.html) /userCp.php?action=$1&vars=$2
but of course all i'm getting for $2 is .html
The final outcome should look something like userCP/compose.html?id=1&return=0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您所要做的就是添加
QSA
标志: 标记 QSA Apache 文档。All you have to do is add the
QSA
flag: Flag QSA Apache Docs.