HTAccess - Confusing clean url's

后端 未结 2 373
野趣味
野趣味 2021-01-27 17:32

If i wanted to simply redirect /clients/page/ to /clients.php?view=page i would use something as simple as this, it works great.

Option         


        
2条回答
  •  太阳男子
    2021-01-27 17:48

    I think you're looking for the [QSA] flag on the RewriteRule:

    http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#RewriteRule

    That should cause mod_rewrite to preserve your original query parameters.

    RewriteRule ^clients/([^/]+) /clients.php?section=$1 [QSA,NC]
    

提交回复
热议问题