Forum Topic: How to match case with RedirectMatch

Forum: .htaccess Forum : General • Posted by 0racle • Post Date:

With mod_rewrite it's possible to specify case insensitivity with the [NC] flag.. is it possible to do the same with mod_alias and RedirectMatch?

For example, I want to redirect lowercase and uppercase versions in this rule:

RedirectMatch /business/ http://example.com/

1 Reply to “How to match case with RedirectMatch”

Jeff Starr
Posted by Jeff Starr

Yes it's possible but only for more recent versions of Apache. Just prefix your rule with (?i), like so:

RedirectMatch (?i)/business/ http://example.com/