Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

htaccess + masking + CGI.SERVER_NAME

Status
Not open for further replies.

jesse1

Programmer
Aug 29, 2008
30
0
0
US
I am using the following code to redirect to a subdomain:

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
 
The client is going to display the resource it last downloaded. Nothing, I know of, in ColdFusion can change that behavior. You should probably try the javascript forum or a forum for you web server.

Lyndon

---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
 
sounds like you should be doing that in your webserver.. i.e. apache or iis.


if(!SUCCEED) try();
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top