Put this at the top of your application.cfm (test this first since I just
typed it).
<cfif cgi.server_name does not contain "www.domain.com">
<cfheader statuscode="301" statustext="Moved Permanently">
<cfheader name="location"
value="http://www.domain.com#trim(script_name)#">
<cfabort>
</cfif>
I use this to help with canonical issues and search engines.
-----Original Message-----
From: Che Vilnonis [mailto:[EMAIL PROTECTED]
Sent: Monday, May 05, 2008 7:52 AM
To: CF-Talk
Subject: RE: IIS Question...
Mike, I never thought of that.
Should the code be placed in the onRequestStart function?
Also, this would be a case where I'd need a 301 redirect, right?
Thanks, Che
-----Original Message-----
From: Dawson, Michael [mailto:[EMAIL PROTECTED]
Sent: Monday, May 05, 2008 10:38 AM
To: CF-Talk
Subject: RE: IIS Question...
In your Application.cfc/.cfm, you can check the CGI variables and then
redirect the browser.
m!ke
-----Original Message-----
From: Che Vilnonis [mailto:[EMAIL PROTECTED]
Sent: Monday, May 05, 2008 9:00 AM
To: CF-Talk
Subject: OT: IIS Question...
Is there a way with IIS to automatically redirect traffic from mydomain.com
to www.mydomain.com? Or do I need to purchase a rewrite tool for IIS?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304750
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4