The following HTTP request results in a "See the error log for more details; Invalid Value Found For Domain" error:

GET / HTTP/1.0
Host: www.MyWebsite.com

If I make the hostname all lowercase, however, it works just fine.

How can I make Apache case insensitive? Here's my httpd.conf file:

<VirtualHost *:80>
    ServerName mywebsite.com
    ServerAlias www.mywebsite.com


I tried adding ServerAlias www.MyWebsite.com to that but that didn't help. And in any event, it seems like that's a poor approach anyway since the case can be mixed up in a ton of different ways and trying to account for all of them would result in a huge *.conf file.

Any ideas?


  • 1
    So what was in the error log? Jun 24, 2013 at 22:14

1 Answer 1


This set of Rewrite lines will lowercase all your requests.

RewriteMap    lowercase      int:tolower
RewriteCond %{HTTP_HOST} [A-Z]
RewriteRule (.*) http://${lowercase:%{HTTP_HOST}}$1 [R,L]

Hope that helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.