GET variable after mod_rewrite

后端 未结 2 968
难免孤独
难免孤独 2021-01-14 22:00

I have a set of product pages that obey the following htaccess rule:

RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_URI} ^/([0-9]+)\\-(.+)\\.html
         


        
2条回答
  •  再見小時候
    2021-01-14 22:44

    Your looking for QSA, Query String Append

    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteCond %{REQUEST_URI} ^/([0-9]+)\-(.+)\.html
    RewriteRule ^(.*)$ /product/index.php?prod=%1-%2 [L,QSA]
    

提交回复
热议问题