Hello,<br><br>I am using Nginx 0.7.54 with php 5.2.8 as the web server. When I configure the host name, like: *.<a href="http://music.goog.com">music.goog.com</a>, I find a very wield phenonmenon that I can&#39;t get the third level of this domain. <br>
<br>I print this variable in php:<br>$_SERVER[&#39;SERVER_NAME&#39;] ; it says: <a href="http://music.goog.com">music.goog.com</a><br><br>my nginx.conf follows like:<br>    server<br>    {<br>        listen       80;<br>        server_name  <a href="http://music.goog.com">music.goog.com</a> *.<a href="http://music.goog.com">music.goog.com</a>;<br>
        index index.html index.htm index.php;<br>    ...<br>    }<br><br>The requirement is I wanna get the third level of domain which is the short code of countries, (ex: ar, br, cn, us) to set the cookies then redirect to the concerned page. My idea is to redirect in the php page. I try to use url parameters with &quot;?country=us&quot; to implement. It&#39;s ok but it&#39;s no use when users only input &quot;<a href="http://ar.music.goog.com">http://ar.music.goog.com</a>&quot; or to show confusing result with &quot;<a href="http://ar.music.goog.com/?country=us">http://ar.music.goog.com/?country=us</a>&quot;<br>
<br>Hoping the experts reply.<br>