views:

43

answers:

1

Hello,

We have run into an issue where we have an existing Alias, and we would like to add a rewrite rule to catch all variations of case-insensitive spellings, ie:

URL: http://www.example.com/example

Alias /example "/var/www/html/web/example"

We need a rewrite rule to catch:

/ExamPle

/exampLE

/eXAmple

etc ...

If anyone could help, that would be great! We cannot seem to get the rewrite & Alias to work together.

Thanks and God Bless!

A: 

In your main configuration:

RewriteRule ^/example(?:$|/)(.*) /example/$1 [NC,PT,R]

The magic is in the NC (no case) modifier. If you don't want a forward, you can omit the R modifier. The PT (pass-through) modifier should make it play well with Alias.

Artefacto
Larry
Please write what are your current relevant configuration directives.
Artefacto