3

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 any idea what I could add to make that work?

Thanks!

Drew
  • 6,736
  • 17
  • 64
  • 96

1 Answers1

4

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

RewriteRule ^brand/([0-9a-zA-Z-]+)/?$ find_by_brand.php?brand=$1 [NC,L]
Michael Berkowski
  • 267,341
  • 46
  • 444
  • 390
  • Perfect thanks. Quick question.. if I am adding another RewriteRule for the index, I have: RewriteRule ^([^/]+)/?$ index.php?shop_id=$1 [L,QSA] - It is messing with my first rewrite rule posted above. Am I allowed to have more than one? – Drew Oct 11 '11 at 19:37
  • @Drew also add the `[L]` flag to this one to prevent it from interfering with the next one. Edited above. – Michael Berkowski Oct 11 '11 at 19:40