Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For example, I'd like to have show

This almost works, but ends up forcing a redirect loop:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?\.com 
RewriteRule ^(.*)$$1 [L,R=301]

Is there any way to do this? I know it's weird, but I'm just curious if it's possible to do without ending up in a loop.

share|improve this question
up vote 2 down vote accepted

No - a client browser will always lowercase it before sending the Host HTTP header, so it'll always redirect loop.

share|improve this answer
Thanks, that's exactly the answer I was looking for. I noticed my browser wouldn't keep an upper-case domain name, but I didn't know why. – TheN3rd Jul 19 '13 at 3:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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