Arbitrarily slicing $server_name into subdomains?

Tobia Conforto tobia.conforto at gmail.com
Fri Jan 15 02:10:16 MSK 2010


Igor Clark wrote:
> Thanks Tobia. That makes sense, though it makes the obsessive tidier inside me a bit uncomfortable ;-) It would be great to be able to do a real arbitrary list, I wonder if there's a way to do that?


What's the problem? The multiple ///? They are normalized at the OS level! Or maybe it's the upper limit to the subdomains? Do you need more than 9 subdomains?

merlin corey wrote:
> a simple application that just does routing the way you want. 20 line or less python script including the fastcgi and daemonize

Sure. But I still like my regexp better. It does exactly what he needs, it's simpler (2 lines of code), fewer points of failure, and it's surely faster (libpcre, already compiled into nginx)

Tobia


More information about the nginx mailing list