House of Fusion
Home of the ColdFusion Community

Search cf-talk

December 02, 2008

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
   1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31       

Search over 2,500 ColdFusion resources here  >>>      
Home /  Groups /  ColdFusion Talk (CF-Talk)

IIS Question

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Che Vilnonis
05/05/2008 09:58 AM

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? Thanks, Che

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dawson, Michael
05/05/2008 10:40 AM

In your Application.cfc/.cfm, you can check the CGI variables and then redirect the browser. m!ke 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? Thanks, Che

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Che Vilnonis
05/05/2008 10:50 AM

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 In your Application.cfc/.cfm, you can check the CGI variables and then redirect the browser. m!ke 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?

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dawson, Michael
05/05/2008 11:48 AM

onRequestStart appears to be the best place for this code. 301 would be appropriate if that is what you want.  Will this be a permanent or temporary redirect? Also, the additional DNS entry suggestions may be a better solution, if that is an option for you. m!ke 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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Jacob
05/05/2008 12:01 PM

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. 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 In your Application.cfc/.cfm, you can check the CGI variables and then redirect the browser. m!ke 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?

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Che Vilnonis
05/05/2008 12:07 PM

Jacob... that is exactly what I am looking for. And yes, I am doing this for search engines ranking purposes. Otherwise, it would not matter to me. ;) Eric, I'm no DNS wiz, but I already have a "www" and a "blank" host A-record entry entry for the domain that points to the same IP. I simply wanted all domain.com traffic to go to www.domain.com automatically.   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. 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 In your Application.cfc/.cfm, you can check the CGI variables and then redirect the browser. m!ke 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?

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Jacob
05/05/2008 12:40 PM

Also... For Google, set up the Google Webmaster tools for your website.  Add your site and set the preferred domain to "www". https://www.google.com/webmasters/tools/siteoverview?hl=en Jacob Jacob... that is exactly what I am looking for. And yes, I am doing this for search engines ranking purposes. Otherwise, it would not matter to me. ;) Eric, I'm no DNS wiz, but I already have a "www" and a "blank" host A-record entry entry for the domain that points to the same IP. I simply wanted all domain.com traffic to go to www.domain.com automatically.   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. 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 In your Application.cfc/.cfm, you can check the CGI variables and then redirect the browser. m!ke 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?

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Che Vilnonis
05/05/2008 12:52 PM

Thanks for the tip. I almost forgot to do that! :) Also... For Google, set up the Google Webmaster tools for your website.  Add your site and set the preferred domain to "www". https://www.google.com/webmasters/tools/siteoverview?hl=en Jacob Jacob... that is exactly what I am looking for. And yes, I am doing this for search engines ranking purposes. Otherwise, it would not matter to me. ;) Eric, I'm no DNS wiz, but I already have a "www" and a "blank" host A-record entry entry for the domain that points to the same IP. I simply wanted all domain.com traffic to go to www.domain.com automatically.   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. 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 In your Application.cfc/.cfm, you can check the CGI variables and then redirect the browser. m!ke 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?

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Eric Roberts
05/05/2008 11:42 AM

I think that is more of a dns issue than an IIS one.  You should have a DNS entry that says (I forget the exact verbage) to the effect of www and have that point to @ (which should be assigned to mydomain.com or something to that effect. This is how I have mine set up... (CNAME)www   @ (CNAME)ftp   @ @ points to the ip of my server(via the A Record)... (courtesy of the godaddy dns manager ;-) ) Eric /*-----Original Message----- /* /*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? /* /*Thanks, Che /* /* /*

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
David
05/05/2008 04:03 PM

Try Ionics IIRF; free and open source rewrite. http://cheeso.members.winisp.net/IIRF.aspx http://www.codeplex.com/IIRF On Mon, May 5, 2008 at 9:59 AM, Che Vilnonis <chevy@asitv.com> wrote: > 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? > >  Thanks, Che

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
JediHomer
05/06/2008 07:34 AM

I tend to create 2 sites in IIS, one containing the host-header www.mydomain.com, this one contains the site, then the other site created contains all the variations to the host-header, then set the home directory to be a permanent redirection to the first site. HTH 2008/5/5 Che Vilnonis <chevy@asitv.com>: > 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? > >  Thanks, Che

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Cutter (CFRelated)
05/08/2008 10:55 AM

Why do you do that? Preserving the original domain? On the 'Web Sites' tab of a site's properties there is an Advanced button next to the IP Address field. Here you can specify a number of separate host headers for the same site. (This is for IIS 6. IIS 7 may be different, I haven't played with it yet.) Steve "Cutter" Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _____________________________ http://blog.cutterscrossing.com JediHomer wrote: > I tend to create 2 sites in IIS, one containing the host-header > www.mydomain.com, this one contains the site, then the other site > created contains all the variations to the host-header, then set the > home directory to be a permanent redirection to the first site. > > HTH

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
JediHomer
05/08/2008 12:12 PM

Just so that all domains and variations for that domain are sent to the full domain name that we use to market that site. We will often but the .co.uk and .net domains but only market the .com.  We then get the .co.uk and .net to forward to the .com 2008/5/7 Cutter (CFRelated) <cold.fusion@cutterscrossing.com>: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Kevin Aebig
05/05/2008 11:29 AM

If you're doing your own dns, why not just add another host header for www.domain.com as well? !k 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? Thanks, Che


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists