<p dir="ltr">On 3 Aug 2013 23:07, "justin" <<a href="mailto:nginx-forum@nginx.us">nginx-forum@nginx.us</a>> wrote:<br>
><br>
> I am using a regular expression in a server_name:<br>
><br>
> server_name ~^(?!web2\.)(?<account>.+)\.mydomain\.com$;<br>
><br>
> In PHP, or any language for that matter, if I:<br>
><br>
> echo $_SERVER['server_name'];<br>
> //~^(?!web2\.)(?.+)\.mydomain\.com$<br>
><br>
> I get the raw regular expression back. Is it possible to mask this, and<br>
> instead return the actual regular expression matchedaccount? I.E.<br>
> <a href="http://foo.mydomain.com">foo.mydomain.com</a>.</p>
<p dir="ltr">Have you tried looking at the "Host" HTTP header? </p>
<p dir="ltr">J</p>