Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm considering using apache's mod_rewrite module to capitalize a single character in my domain name as presented to a user. For example:

www.testatest.com

would become

www.testAtest.com

  1. Is this possible?
  2. Is there any reason I might not want to do this?
share|improve this question

closed as off topic by Simon Sheehan, slhck, Journeyman Geek, studiohack Oct 30 '11 at 23:29

Questions on Super User are expected to relate to computer software or computer hardware within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 1 down vote accepted

I really don't think this would work. Best strategy, I think, would be to use the HTTP Location header in order to send the browser to testAtest.com if they went to testatest.com. Thing is, domains aren't case sensitive, so most (if not all) browsers just stick to always making them lower-case. For example, if I type "Google.com" in to Chrome 11, it downcases it to "google.com" immediately. To verify that this is not just due to google.com redirecting to www.google.com, try CE-INT.net. This server will respond directly without the www, and notice that Chrome still downcases it to ce-int.net.

A quick test indicates that Firefox and IE (latest versions of both) show the same behavior. So, even if you redirect someone to the correct capitalization, their browser will drop the caps. This is probably a technique on the part of browser makers to ensure that domains typed in different cases are still recognized as the same domain, for purposes of same-origin, history management, etc.

share|improve this answer

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