Get a subdomain of a URL using ColdFusion -


how can subdomain of url using coldfusion?

for example, had following url:

http://support.foo.com

how 'support'?

is there built in function this?

here's basic idea:

<cfset domain = cgi.server_name> <cfset subdomain = "">  <cfif listfirst(domain, ".") neq "foo" , listfirst(domain, ".") neq "www">     <cfset subdomain = listfirst(domain, ".")> </cfif> 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -