开发者

htaccess Rewrite Rule - Allowing Capital Letters in URL

开发者 https://www.devze.com 2023-04-12 02:22 出处:网络
I have the following Rewrite Rule: RewriteEngine On RewriteRule ^brand/([0-9a-zA-Z-]+)/?$ find_by_brand.php?brand=$1

I have the following Rewrite Rule:

RewriteEngine On
RewriteRule ^brand/([0-9a-zA-Z-]+)/?$ find_by_brand.php?brand=$1
RewriteCond %{THE_REQUEST} find_by_brand\.php
RewriteRule ^find_by_brand\.php - [F]

I want it to be able to work if I go to /Michelin/ and also /michelin/

Does anyone have 开发者_如何学Cany idea what I could add to make that work?

Thanks!


Add the [NC] flag ("no case")

RewriteRule ^brand/([0-9a-zA-Z-]+)/?$ find_by_brand.php?brand=$1 [NC,L]
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号