Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

For example, I'd like to have foobar.com show FooBar.com

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

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?foobar.com\.com 
RewriteRule ^(.*)$ http://FooBar.com/$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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.