Reputation: 382
I want to direct my users based on a case-sensitive url:
www.mysite.com/a ==> page 1
www.mysite.com/A ==> page 2
I'm using the ISAPI rewrite with the following rule:
RewriteRule ^([0-9a-zA-Z] {1,7}) $/redirect/?K=$1 [L]
Apparently this rule is not case-sensitive, since it redirects to the same page. What's is wrong?
=====UPDATE=====
I solved in part this problem by adding a binary query (case-sensitive) in my MySql statement. But in chrome this problem still occurs.
Upvotes: 1
Views: 426
Reputation: 511
I see 2 problems:
1) space between [] and {}
2) your regular expression is non-case sensitive
for lowercase expression you need RewriteRule ^([0-9a-z]{1,7}) $/redirect/?K=$1 [L] and for upper-case RewriteRule ^([0-9A-Z]{1,7}) $/redirect/?K=$1 [L]
Upvotes: 1