| Case Insensitive Rewrite Rule I know I need to add an "i" but where? |
itledi

msg:3536596 | 8:16 pm on Dec 28, 2007 (gmt 0) | I'm trying to modify a rewrite rule in my .htaccess file to be case insensitive. RewriteRule ^([aeiouy]{1})/?$ ... I know I need to add an "i" somwhere to make it to also accept uppercase letters, but where? I guessed inside the set at the end, but it didn't seem to work. RewriteRule ^([aeiouy/i]{1})/?$ ...
|
milanmk

msg:3536639 | 9:18 pm on Dec 28, 2007 (gmt 0) | You need to set flag (NC) as third argument to the RewriteRule directive. Apache module mod_rewrite [httpd.apache.org] Milan
|
jdMorgan

msg:3536646 | 9:30 pm on Dec 28, 2007 (gmt 0) | And the "{1}" is redundant, since {1} is the default quantifier for all pattern elements:
RewriteRule ^([aeiouy])/?$ new_path [NC]
Also, you won't need the parentheses unless you wish to back-reference the enclosed matched subpattern. Jim
|
itledi

msg:3536656 | 9:42 pm on Dec 28, 2007 (gmt 0) | Thank you. The [NC] does the trick, and I also didn't realize that {1} is redundent, now now I'm able to trim up my code a bit. I do back reference the subpattern.
|
|
|