GET variable after mod_rewrite

后端 未结 2 970
难免孤独
难免孤独 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:38

    Add the QSA flag to pass along existing query string params

    RewriteRule . /product/index.php?prod=%1-%2 [QSA,L]
    

    Also edited match as . and ^.*$ are equivalent in this case

提交回复
热议问题