Man In Tan Posted March 1, 2012 Share Posted March 1, 2012 Currently, I use a pair of virtual host to handle any traffic that hits my server. One handles my main domain, the other handles all other domains, including sub-domains of my main domain. In this way, I can create temporary hosts on the fly, when I need them, while redirecting invalid names, such as "www.", to my root domain. But recently, I found that Apache (2.x ?) is treating "0gb.us." (with a trailing dot) as "0gb.us" (no trailing dot), and sending these requests to the main virtual host, as it probably SHOULD do by default. But this causes unusual cookie behavior, and in PHP, the $_SERVER['HTTP_HOST'] variable differs depending on whether the user input the trailing dot or not, causing issues in one of my scripts. Is it safe for me to redirect these requests as I do invalid names (or even vice versa)? The trailing dot form is technically more valid, so will redirecting it to the non-trailing dot domain cause issues for some people's browsers or other applications? Such as infinite loops? Or inability to connect / ambiguity? Maybe I'm just being paranoid. Should just leave it alone? Link to comment Share on other sites More sharing options...
boen_robot Posted March 1, 2012 Share Posted March 1, 2012 I'd leave this alone... most, if not all applications use a form without a trailing dot, and those that do are typically wise enough to make such corrections themselves. Users? Most don't even know the trailing dot could be placed there. Link to comment Share on other sites More sharing options...
Man In Tan Posted March 1, 2012 Author Share Posted March 1, 2012 Alright, thank you for your advice. I guess I was just over thinking this. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.