How can I make this rewrite rule accept only lower case?
RewriteRule ^/?([a-z]{2})/?$
I tried doing .*/i for the first part. But it wont work. It still lets uppercase thru:
RewriteRule ^/?([a-z]{2}.*/i)/([a-z0-9\-]+)/([a-z0-9()_\-.]+)/?$
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Unless your
RewriteRuleis followed by the[nocase]flag, the matching should be case-sensitive. So your first rule is supposed to work.Note that it is NOT possible to add flags using the PHP-/JS-style
/i. The latter would match a literal slash followed by a lower-casei.