I am using the following code to redirect to a subdomain:
This works but it does not mask the url. After forwarding the url reads: I want it to read demo.mydomain.com
Code:
<cfset request.UrlStr = "[URL unfurl="true"]http://"&#CGI.SERVER_NAME#&#CGI.PATH_INFO#>[/URL]
<cfif CGI.SERVER_NAME EQ '[URL unfurl="true"]www.demo.mydomain.com'[/URL] or CGI.SERVER_NAME EQ 'demo.mydomain.com'>
<cflocation url="[URL unfurl="true"]http://www.mydomain.com/demo"></cfif>[/URL]
This works but it does not mask the url. After forwarding the url reads: I want it to read demo.mydomain.com