Htacess Rewrite Rule - Doesn't work without Trailing Slash

后端 未结 2 443
孤街浪徒
孤街浪徒 2021-01-25 16:59

So I have the following Rewrite Rules:

RewriteRule ^([a-z0-9_\\-]+)(\\.php)?$ index.php?page=$1 [NC,L,QSA]
RewriteRule ^([a-zA-Z0-9_-]+)/$ index.php?shop=$1&         


        
2条回答
  •  独厮守ぢ
    2021-01-25 17:29

    I usually end my rules with /?$ meaning string ending with one slash or no shash.

提交回复
热议问题