How can I redirect a subdomain URL to a specific directory within my main site using Coldfusion? I have the subdomain "http://sub.mydomain.com" and I want to direct it to "http://www.mydomain.com/sub/index.cfm". I tried adding the following code to my application.cfm file but it didn't work:
<cfif #CGI.SERVER_NAME# CONTAINS "sub.mydomain.com">
<!--- the cfabort is there so it doesn't execute the rest of the application.cfm --->
Any suggestions? Our sites are hosted so I cannot make any changes to the CF Administrator or at the server level.