How do you make .htaccess pass all GET parameters without knowing what they are named?

后端 未结 2 606
悲&欢浪女
悲&欢浪女 2020-12-17 20:05

I am working on a CMS that involves custom user pages. I have a hierarchy with three levels set up, and it works pretty well. It\'s got a .htaccess that makes the URLs frien

相关标签:
2条回答
  • 2020-12-17 20:49

    add QSA to your parameters. so for your first rule it would become

    RewriteRule ^([A-Za-z0-9]+).html /content.php?page=$1 [L, QSA]
    
    0 讨论(0)
  • 2020-12-17 21:07

    You'll need to use the QSA (query string append) flag. The mod_rewrite documentation has more detail.

    0 讨论(0)
提交回复
热议问题