[cfaussie] Re: 301 redirect not changing URL [SOLVED]

2007-12-23 Thread Charlie Arehart (lists account)

Hey folks, I know this discussion of 301 redirects is a couple weeks old,
and that Ryan says he's solved the problem, but I don't recall anyone
bringing something that could be useful, if one's on CF8 (and I don't recall
Ryan saying if he is).

CFLOCATION now accepts the StatusCode as an attribute itself, so you can do
a 301 with CFLOCATION. It muddies the waters a bit, since for so long all
have associated CFLocation instantly as being a 302, as in this thread. Oh
well. It's Christmas. Consider it a new toy. :-) It's one of the 100+ hidden
gems I've chronicled in the talk I've given, Hidden Gems in CF8, which I
intend to turn into a modestly priced half-day online course in the new
year.

More on this CFLOCATION STATUSCODE feature (other than the docs, of course)
is at:

http://www.petefreitag.com/item/648.cfm
http://www.coldfusionguy.com/ColdFusion/blog/index.cfm/2007/12/6/301-Redirec
ts-With-CFLocation-StatusCode-Attribute
http://www.coldfusionjedi.com/index.cfm/2007/6/7/Automatically-pushing-to-a-
new-URL-and-how-ColdFusion-8-makes-this-a-bit-simpler

More on the concept in general is also available at:
http://www.wrox.com/WileyCDA/Section/id-306460.html

Seriously, though, Merry Christmas to all.

/charlie

-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Ryan Sabir
Sent: Monday, December 17, 2007 7:27 PM
To: 'cfaussie@googlegroups.com'
Subject: [cfaussie] Re: 301 redirect not changing URL [SOLVED]


Hi all,
 
Andrew here came up with the solution:
 
You need to write the header tag like this :

cfheader statuscode=301 statustext=Moved
Permanently#Chr(13)##Chr(10)#Location:#newurl#

All in one line. Now the redirect works.. and the URL changes.

Yippee!



From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Rony Fayyad
Sent: Tuesday, 18 December 2007 11:10 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: 301 redirect not changing URL


You could also try running that snippet of code on  a different Coldfusion
instance and see if the issue still ocurrs - may be try it on your local
host or another dev box.
 
See if its a CF thing

- Original Message - 
From: Ryan Sabir mailto:[EMAIL PROTECTED]  
To: 'cfaussie@googlegroups.com' 
Sent: Tuesday, December 18, 2007 10:48 AM
Subject: [cfaussie] Re: 301 redirect not changing URL

 
CFLOCATION is a 302 redirect. It tells the search engine that the
resource requested has been moved temporarily. A 301 redirect tells a search
engine that the resource has been moved permanently, so no longer look for
it at the original URL.
 
At least that's how I understand how it works.

 


From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Blair McKenzie
Sent: Tuesday, 18 December 2007 10:42 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: 301 redirect not changing URL


Is there any reason not to use cflocation? Does it not handle that
stuff?

Blair


On Dec 18, 2007 10:38 AM, Ryan Sabir [EMAIL PROTECTED] wrote: 


Yeah but I want the redirect to be a Moved Permanently
rather than Moved Temporarily. Its for a site that has changed its URL
structure.



From: cfaussie@googlegroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Andrew Scott
Sent: Tuesday, 18 December 2007 10:06 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: 301 redirect not changing URL



Try 302 instead.

 



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  9015 8628
Mobile: 0404 998 273

 

 

From: cfaussie@googlegroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Ryan Sabir
Sent: Tuesday, 18 December 2007 9:59 AM
To: 'cfaussie@googlegroups.com'
Subject: [cfaussie] 301 redirect not changing URL

 

Heya, 

 

I'm doing a 301 redirect using CFHEADER like so:

 

cfheader statuscode=301 statustext=Moved permanently
cfheader name=Location value=http://www.new-url.com; 

 

The redirect correctly shows the new page content, but the
URL in the browser window is still the old URL. If I bookmark it, its
actually bookmarking the old URL. How can I do an SEO friendly redirect, and
change the URL as well?

 

thanks

[cfaussie] Re: 301 redirect not changing URL

2007-12-18 Thread Adam Cameron

Hi Ryan
What browser are you seeing this in?

I've just tested this in IE7, FF2, Opera9, and all work as one would
expected, with redirected (dest.cfm in this case) URL in the address
bar.  Test code:

{code}
source.cfm
cfheader statuscode=301 statustext=Moved Permanently
cfheader name=location value=http://localhost:8302/shared/cf/cfml/
header/dest.cfm

dest.cfm
cfdump var=#CGI#
{code}

NB: to whomever said either a 301 or a 302 is a server-side redirect:
they're both client-side.  This should be obvious by the fact that for
the redirect to be implemented, they send an HTTP status code.  Where
do you think they're *sending* the status code?  To the browser (you
can see this if you use a packet sniffer to watch the HTTP requests
from the broeser: there'llbe two: a 301 and a 200).  The redirect code
tells the browser actually you'll be wanting this URL (and for this
reason).  For this sort of thing you definitely *want* a client-side
message (ie: the 301), because it tells search engines to stop trying
that URL, and use the new one instead.  With humans, it probably
doesn't matter so much.

--
Adam
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: 301 redirect not changing URL

2007-12-17 Thread Andrew Scott
Try 302 instead.

 



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  9015 8628
Mobile: 0404 998 273

 

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Ryan Sabir
Sent: Tuesday, 18 December 2007 9:59 AM
To: 'cfaussie@googlegroups.com'
Subject: [cfaussie] 301 redirect not changing URL

 

Heya, 

 

I'm doing a 301 redirect using CFHEADER like so:

 

cfheader statuscode=301 statustext=Moved permanently
cfheader name=Location value=http://www.new-url.com; 

 

The redirect correctly shows the new page content, but the URL in the
browser window is still the old URL. If I bookmark it, its actually
bookmarking the old URL. How can I do an SEO friendly redirect, and change
the URL as well?

 

thanks.

 

 


  http://www.newgency.com/footerImages/logo.gif 

Ryan Sabir
Technical Director

p: (02) 9274 8030
f: (02) 9274 8099
m: 0411 512 454
w:  http://www.newgency.com/ www.newgency.com

  http://www.newgency.com/footerImages/divider.gif 

Newgency Pty Ltd
Web | Multimedia | eMarketing

115 Cooper St
Surry Hills NSW 2010
Sydney, Australia

 



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: 301 redirect not changing URL

2007-12-17 Thread Ryan Sabir
Yeah but I want the redirect to be a Moved Permanently rather than Moved 
Temporarily. Its for a site that has changed its URL structure.




From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew 
Scott
Sent: Tuesday, 18 December 2007 10:06 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: 301 redirect not changing URL


Try 302 instead.
 


Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  9015 8628
Mobile: 0404 998 273
 
 
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ryan 
Sabir
Sent: Tuesday, 18 December 2007 9:59 AM
To: 'cfaussie@googlegroups.com'
Subject: [cfaussie] 301 redirect not changing URL
 
Heya, 
 
I'm doing a 301 redirect using CFHEADER like so:
 
cfheader statuscode=301 statustext=Moved permanently
cfheader name=Location value=http://www.new-url.com; 
 
The redirect correctly shows the new page content, but the URL in the browser 
window is still the old URL. If I bookmark it, its actually bookmarking the old 
URL. How can I do an SEO friendly redirect, and change the URL as well?
 
thanks.
 
 
Ryan Sabir
Technical Director

p: (02) 9274 8030
f: (02) 9274 8099
m: 0411 512 454
w: www.newgency.comNewgency Pty Ltd
Web | Multimedia | eMarketing

115 Cooper St
Surry Hills NSW 2010
Sydney, Australia
 


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: 301 redirect not changing URL

2007-12-17 Thread Blair McKenzie
Is there any reason not to use cflocation? Does it not handle that stuff?

Blair

On Dec 18, 2007 10:38 AM, Ryan Sabir [EMAIL PROTECTED] wrote:

  Yeah but I want the redirect to be a Moved Permanently rather than
 Moved Temporarily. Its for a site that has changed its URL structure.

  --
 *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Andrew Scott
 *Sent:* Tuesday, 18 December 2007 10:06 AM
 *To:* cfaussie@googlegroups.com
 *Subject:* [cfaussie] Re: 301 redirect not changing URL

  Try 302 instead.





 Andrew Scott
 Senior Coldfusion Developer
 Aegeon Pty. Ltd.
 www.aegeon.com.au
 Phone: +613  9015 8628
 Mobile: 0404 998 273





 *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Ryan Sabir
 *Sent:* Tuesday, 18 December 2007 9:59 AM
 *To:* 'cfaussie@googlegroups.com'
 *Subject:* [cfaussie] 301 redirect not changing URL



 Heya,



 I'm doing a 301 redirect using CFHEADER like so:



 cfheader statuscode=301 statustext=Moved permanently
 cfheader name=Location value=http://www.new-url.com;



 The redirect correctly shows the new page content, but the URL in the
 browser window is still the old URL. If I bookmark it, its actually
 bookmarking the old URL. How can I do an SEO friendly redirect, and change
 the URL as well?



 thanks.





  *Ryan Sabir*
 Technical Director

 *p:* (02) 9274 8030
 *f:* (02) 9274 8099
 *m:* 0411 512 454
 *w:* www.newgency.com

  *Newgency Pty Ltd*
 Web | Multimedia | eMarketing

 115 Cooper St
 Surry Hills NSW 2010
 Sydney, Australia





 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: 301 redirect not changing URL

2007-12-17 Thread Sarah Barry
Ryan,

 

You are better doing this at the server level rather
than by scripting.

Is this a possibility for you?

Apache easier than IIS but both can be done at the site
level and at the page level

 

Ciao

sarah

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ryan Sabir
Sent: Tuesday, 18 December 2007 9:38 AM
To: 'cfaussie@googlegroups.com'
Subject: [cfaussie] Re: 301 redirect not changing URL

 

Yeah but I want the redirect to be a Moved Permanently rather than
Moved Temporarily. Its for a site that has changed its URL structure.

 



From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andrew Scott
Sent: Tuesday, 18 December 2007 10:06 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: 301 redirect not changing URL

Try 302 instead.

 



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  9015 8628
Mobile: 0404 998 273

 

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ryan Sabir
Sent: Tuesday, 18 December 2007 9:59 AM
To: 'cfaussie@googlegroups.com'
Subject: [cfaussie] 301 redirect not changing URL

 

Heya, 

 

I'm doing a 301 redirect using CFHEADER like so:

 

cfheader statuscode=301 statustext=Moved permanently
cfheader name=Location value=http://www.new-url.com; 

 

The redirect correctly shows the new page content, but the URL in the
browser window is still the old URL. If I bookmark it, its actually
bookmarking the old URL. How can I do an SEO friendly redirect, and
change the URL as well?

 

thanks.

 

 

 

Ryan Sabir
Technical Director

p: (02) 9274 8030
f: (02) 9274 8099
m: 0411 512 454
w: www.newgency.com http://www.newgency.com/ 

 

Newgency Pty Ltd
Web | Multimedia | eMarketing

115 Cooper St
Surry Hills NSW 2010
Sydney, Australia

 

 

 

BR


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---

inline: image001.jpginline: image002.jpg

[cfaussie] Re: 301 redirect not changing URL

2007-12-17 Thread Steve Onnis
CFLOCATION basically does a client side redirect so by that stage it is no
good.  You need to do a server side redirect which is what happens when you
set it up on the web server as a permanent redirect (I believe)

  _  

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Blair McKenzie
Sent: Tuesday, 18 December 2007 10:42 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: 301 redirect not changing URL


Is there any reason not to use cflocation? Does it not handle that stuff?

Blair


On Dec 18, 2007 10:38 AM, Ryan Sabir [EMAIL PROTECTED] wrote: 


Yeah but I want the redirect to be a Moved Permanently rather than Moved
Temporarily. Its for a site that has changed its URL structure.

  _  

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Andrew Scott
Sent: Tuesday, 18 December 2007 10:06 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: 301 redirect not changing URL



Try 302 instead.

 



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  9015 8628
Mobile: 0404 998 273

 

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Ryan Sabir
Sent: Tuesday, 18 December 2007 9:59 AM
To: 'cfaussie@googlegroups.com'
Subject: [cfaussie] 301 redirect not changing URL

 

Heya, 

 

I'm doing a 301 redirect using CFHEADER like so:

 

cfheader statuscode=301 statustext=Moved permanently
cfheader name=Location value=http://www.new-url.com; 

 

The redirect correctly shows the new page content, but the URL in the
browser window is still the old URL. If I bookmark it, its actually
bookmarking the old URL. How can I do an SEO friendly redirect, and change
the URL as well?

 

thanks.

 

 




Ryan Sabir
Technical Director

p: (02) 9274 8030
f: (02) 9274 8099
m: 0411 512 454
w:  http://www.newgency.com/ www.newgency.com



Newgency Pty Ltd
Web | Multimedia | eMarketing

115 Cooper St
Surry Hills NSW 2010
Sydney, Australia

 




 







--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: 301 redirect not changing URL

2007-12-17 Thread Ryan Sabir
 
CFLOCATION is a 302 redirect. It tells the search engine that the resource 
requested has been moved temporarily. A 301 redirect tells a search engine that 
the resource has been moved permanently, so no longer look for it at the 
original URL.
 
At least that's how I understand how it works.

 


From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Blair 
McKenzie
Sent: Tuesday, 18 December 2007 10:42 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: 301 redirect not changing URL


Is there any reason not to use cflocation? Does it not handle that stuff?

Blair


On Dec 18, 2007 10:38 AM, Ryan Sabir [EMAIL PROTECTED] wrote: 

Yeah but I want the redirect to be a Moved Permanently rather than Moved 
Temporarily. Its for a site that has changed its URL structure.




From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew 
Scott
Sent: Tuesday, 18 December 2007 10:06 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: 301 redirect not changing URL


Try 302 instead.
 


Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  9015 8628
Mobile: 0404 998 273
 
 
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ryan 
Sabir
Sent: Tuesday, 18 December 2007 9:59 AM
To: 'cfaussie@googlegroups.com'
Subject: [cfaussie] 301 redirect not changing URL
 
Heya, 
 
I'm doing a 301 redirect using CFHEADER like so:
 
cfheader statuscode=301 statustext=Moved permanently
cfheader name=Location value=http://www.new-url.com; 
 
The redirect correctly shows the new page content, but the URL in the browser 
window is still the old URL. If I bookmark it, its actually bookmarking the old 
URL. How can I do an SEO friendly redirect, and change the URL as well?
 
thanks.
 
 
Ryan Sabir
Technical Director

p: (02) 9274 8030
f: (02) 9274 8099
m: 0411 512 454
w: www.newgency.comNewgency Pty Ltd
Web | Multimedia | eMarketing

115 Cooper St
Surry Hills NSW 2010
Sydney, Australia
 


 





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: 301 redirect not changing URL

2007-12-17 Thread Rony Fayyad
Hi Ryan

Try this :

  cfheader statuscode=301 statustext=Moved Permanently /
  cfheader name=location value=http://www.new-url.com; / 
  cfabort /

I am not sure if this wil solve your problem, but give it a go mate!

Also , try the CFLOCATION to see if the address changes  correctly ( this is 
more of a debug thing than a solution ).

If none of the above work, can you please let me know what  code is being run 
before / after calling the CFHeader tag.

Cheers,
Rony
  - Original Message - 
  From: Ryan Sabir 
  To: 'cfaussie@googlegroups.com' 
  Sent: Tuesday, December 18, 2007 10:48 AM
  Subject: [cfaussie] Re: 301 redirect not changing URL



  CFLOCATION is a 302 redirect. It tells the search engine that the resource 
requested has been moved temporarily. A 301 redirect tells a search engine that 
the resource has been moved permanently, so no longer look for it at the 
original URL.

  At least that's how I understand how it works.

   

--
  From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Blair 
McKenzie
  Sent: Tuesday, 18 December 2007 10:42 AM
  To: cfaussie@googlegroups.com
  Subject: [cfaussie] Re: 301 redirect not changing URL


  Is there any reason not to use cflocation? Does it not handle that stuff?

  Blair


  On Dec 18, 2007 10:38 AM, Ryan Sabir [EMAIL PROTECTED] wrote: 

Yeah but I want the redirect to be a Moved Permanently rather than Moved 
Temporarily. Its for a site that has changed its URL structure.




From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
Andrew Scott
Sent: Tuesday, 18 December 2007 10:06 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: 301 redirect not changing URL


Try 302 instead.





Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  9015 8628
Mobile: 0404 998 273





From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ryan 
Sabir
Sent: Tuesday, 18 December 2007 9:59 AM
To: 'cfaussie@googlegroups.com'
Subject: [cfaussie] 301 redirect not changing URL



Heya, 



I'm doing a 301 redirect using CFHEADER like so:



cfheader statuscode=301 statustext=Moved permanently
cfheader name=Location value=http://www.new-url.com; 



The redirect correctly shows the new page content, but the URL in the 
browser window is still the old URL. If I bookmark it, its actually bookmarking 
the old URL. How can I do an SEO friendly redirect, and change the URL as well?



thanks.






 Ryan Sabir
  Technical Director

  p: (02) 9274 8030
  f: (02) 9274 8099
  m: 0411 512 454
  w: www.newgency.com
 
 Newgency Pty Ltd
  Web | Multimedia | eMarketing

  115 Cooper St
  Surry Hills NSW 2010
  Sydney, Australia
 










  

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: 301 redirect not changing URL

2007-12-17 Thread Rony Fayyad
You could also try running that snippet of code on  a different Coldfusion 
instance and see if the issue still ocurrs - may be try it on your local host 
or another dev box.

See if its a CF thing
  - Original Message - 
  From: Ryan Sabir 
  To: 'cfaussie@googlegroups.com' 
  Sent: Tuesday, December 18, 2007 10:48 AM
  Subject: [cfaussie] Re: 301 redirect not changing URL



  CFLOCATION is a 302 redirect. It tells the search engine that the resource 
requested has been moved temporarily. A 301 redirect tells a search engine that 
the resource has been moved permanently, so no longer look for it at the 
original URL.

  At least that's how I understand how it works.

   

--
  From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Blair 
McKenzie
  Sent: Tuesday, 18 December 2007 10:42 AM
  To: cfaussie@googlegroups.com
  Subject: [cfaussie] Re: 301 redirect not changing URL


  Is there any reason not to use cflocation? Does it not handle that stuff?

  Blair


  On Dec 18, 2007 10:38 AM, Ryan Sabir [EMAIL PROTECTED] wrote: 

Yeah but I want the redirect to be a Moved Permanently rather than Moved 
Temporarily. Its for a site that has changed its URL structure.




From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
Andrew Scott
Sent: Tuesday, 18 December 2007 10:06 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: 301 redirect not changing URL


Try 302 instead.





Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  9015 8628
Mobile: 0404 998 273





From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ryan 
Sabir
Sent: Tuesday, 18 December 2007 9:59 AM
To: 'cfaussie@googlegroups.com'
Subject: [cfaussie] 301 redirect not changing URL



Heya, 



I'm doing a 301 redirect using CFHEADER like so:



cfheader statuscode=301 statustext=Moved permanently
cfheader name=Location value=http://www.new-url.com; 



The redirect correctly shows the new page content, but the URL in the 
browser window is still the old URL. If I bookmark it, its actually bookmarking 
the old URL. How can I do an SEO friendly redirect, and change the URL as well?



thanks.






 Ryan Sabir
  Technical Director

  p: (02) 9274 8030
  f: (02) 9274 8099
  m: 0411 512 454
  w: www.newgency.com
 
 Newgency Pty Ltd
  Web | Multimedia | eMarketing

  115 Cooper St
  Surry Hills NSW 2010
  Sydney, Australia
 










  

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: 301 redirect not changing URL

2007-12-17 Thread Ryan Sabir
Thanks for that, I actually did try putting a CFABORT after the CFHEADERs, it 
wouldn't work at all without it.
 
Funny thing is, CFLOCATION actually does change the URL in the browser. I've 
tried moving the CFHEADER to the very top of the Application.cfm file, still no 
dice.
 
Anyway, its not a major issue, I might just have to leave it as a CFLOCATION.
 
I might be able to hack something together using ISAPI rewrite if I'm bothered.




From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rony 
Fayyad
Sent: Tuesday, 18 December 2007 11:02 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: 301 redirect not changing URL


Hi Ryan
 
Try this :
 
cfheader statuscode=301 statustext=Moved Permanently /
cfheader name=location value=http://www.new-url.com; / 
cfabort /
 
I am not sure if this wil solve your problem, but give it a go mate!
 
Also , try the CFLOCATION to see if the address changes  correctly ( this is 
more of a debug thing than a solution ).
 
If none of the above work, can you please let me know what  code is being run 
before / after calling the CFHeader tag.
 
Cheers,
Rony
- Original Message - 
From: Ryan Sabir 
To: 'cfaussie@googlegroups.com' 
Sent: Tuesday, December 18, 2007 10:48 AM
Subject: [cfaussie] Re: 301 redirect not changing URL


 
CFLOCATION is a 302 redirect. It tells the search engine that the resource 
requested has been moved temporarily. A 301 redirect tells a search engine that 
the resource has been moved permanently, so no longer look for it at the 
original URL.
 
At least that's how I understand how it works.

 


From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Blair 
McKenzie
Sent: Tuesday, 18 December 2007 10:42 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: 301 redirect not changing URL


Is there any reason not to use cflocation? Does it not handle that stuff?

Blair


On Dec 18, 2007 10:38 AM, Ryan Sabir [EMAIL PROTECTED] wrote: 

Yeah but I want the redirect to be a Moved Permanently rather than Moved 
Temporarily. Its for a site that has changed its URL structure.




From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew 
Scott
Sent: Tuesday, 18 December 2007 10:06 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: 301 redirect not changing URL


Try 302 instead.
 


Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  9015 8628
Mobile: 0404 998 273
 
 
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ryan 
Sabir
Sent: Tuesday, 18 December 2007 9:59 AM
To: 'cfaussie@googlegroups.com'
Subject: [cfaussie] 301 redirect not changing URL
 
Heya, 
 
I'm doing a 301 redirect using CFHEADER like so:
 
cfheader statuscode=301 statustext=Moved permanently
cfheader name=Location value=http://www.new-url.com; 
 
The redirect correctly shows the new page content, but the URL in the browser 
window is still the old URL. If I bookmark it, its actually bookmarking the old 
URL. How can I do an SEO friendly redirect, and change the URL as well?
 
thanks.
 
 
Ryan Sabir
Technical Director

p: (02) 9274 8030
f: (02) 9274 8099
m: 0411 512 454
w: www.newgency.comNewgency Pty Ltd
Web | Multimedia | eMarketing

115 Cooper St
Surry Hills NSW 2010
Sydney, Australia
 


 




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: 301 redirect not changing URL [SOLVED]

2007-12-17 Thread Ryan Sabir

Hi all,
 
Andrew here came up with the solution:
 
You need to write the header tag like this :

cfheader statuscode=301 statustext=Moved 
Permanently#Chr(13)##Chr(10)#Location:#newurl#

All in one line. Now the redirect works.. and the URL changes.

Yippee!



From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rony 
Fayyad
Sent: Tuesday, 18 December 2007 11:10 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: 301 redirect not changing URL


You could also try running that snippet of code on  a different Coldfusion 
instance and see if the issue still ocurrs - may be try it on your local host 
or another dev box.
 
See if its a CF thing

- Original Message - 
From: Ryan Sabir mailto:[EMAIL PROTECTED]  
To: 'cfaussie@googlegroups.com' 
Sent: Tuesday, December 18, 2007 10:48 AM
Subject: [cfaussie] Re: 301 redirect not changing URL

 
CFLOCATION is a 302 redirect. It tells the search engine that the 
resource requested has been moved temporarily. A 301 redirect tells a search 
engine that the resource has been moved permanently, so no longer look for it 
at the original URL.
 
At least that's how I understand how it works.

 


From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
Blair McKenzie
Sent: Tuesday, 18 December 2007 10:42 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: 301 redirect not changing URL


Is there any reason not to use cflocation? Does it not handle that 
stuff?

Blair


On Dec 18, 2007 10:38 AM, Ryan Sabir [EMAIL PROTECTED] wrote: 


Yeah but I want the redirect to be a Moved Permanently rather 
than Moved Temporarily. Its for a site that has changed its URL structure.



From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On 
Behalf Of Andrew Scott
Sent: Tuesday, 18 December 2007 10:06 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: 301 redirect not changing URL



Try 302 instead.

 



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  9015 8628
Mobile: 0404 998 273

 

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On 
Behalf Of Ryan Sabir
Sent: Tuesday, 18 December 2007 9:59 AM
To: 'cfaussie@googlegroups.com'
Subject: [cfaussie] 301 redirect not changing URL

 

Heya, 

 

I'm doing a 301 redirect using CFHEADER like so:

 

cfheader statuscode=301 statustext=Moved permanently
cfheader name=Location value=http://www.new-url.com; 

 

The redirect correctly shows the new page content, but the URL 
in the browser window is still the old URL. If I bookmark it, its actually 
bookmarking the old URL. How can I do an SEO friendly redirect, and change the 
URL as well?

 

thanks.

 

 



Ryan Sabir
Technical Director

p: (02) 9274 8030
f: (02) 9274 8099
m: 0411 512 454
w: www.newgency.com http://www.newgency.com/ 



Newgency Pty Ltd
Web | Multimedia | eMarketing

115 Cooper St
Surry Hills NSW 2010
Sydney, Australia



 




 












--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: 301 redirect not changing URL [SOLVED]

2007-12-17 Thread Rony Fayyad

Good work !

- Original Message - 
From: Ryan Sabir [EMAIL PROTECTED]
To: cfaussie@googlegroups.com
Sent: Tuesday, December 18, 2007 11:27 AM
Subject: [cfaussie] Re: 301 redirect not changing URL [SOLVED]



Hi all,

Andrew here came up with the solution:

You need to write the header tag like this :

cfheader statuscode=301 statustext=Moved 
Permanently#Chr(13)##Chr(10)#Location:#newurl#

All in one line. Now the redirect works.. and the URL changes.

Yippee!



From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf 
Of Rony Fayyad
Sent: Tuesday, 18 December 2007 11:10 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: 301 redirect not changing URL


You could also try running that snippet of code on  a different Coldfusion 
instance and see if the issue still ocurrs - may be try it on your local 
host or another dev box.

See if its a CF thing

- Original Message - 
From: Ryan Sabir mailto:[EMAIL PROTECTED]
To: 'cfaussie@googlegroups.com'
Sent: Tuesday, December 18, 2007 10:48 AM
Subject: [cfaussie] Re: 301 redirect not changing URL


CFLOCATION is a 302 redirect. It tells the search engine that the resource 
requested has been moved temporarily. A 301 redirect tells a search engine 
that the resource has been moved permanently, so no longer look for it at 
the original URL.

At least that's how I understand how it works.




From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf 
Of Blair McKenzie
Sent: Tuesday, 18 December 2007 10:42 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: 301 redirect not changing URL


Is there any reason not to use cflocation? Does it not handle that stuff?

Blair


On Dec 18, 2007 10:38 AM, Ryan Sabir [EMAIL PROTECTED] wrote:


Yeah but I want the redirect to be a Moved Permanently rather than Moved 
Temporarily. Its for a site that has changed its URL structure.



From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf 
Of Andrew Scott
Sent: Tuesday, 18 December 2007 10:06 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: 301 redirect not changing URL



Try 302 instead.





Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  9015 8628
Mobile: 0404 998 273





From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf 
Of Ryan Sabir
Sent: Tuesday, 18 December 2007 9:59 AM
To: 'cfaussie@googlegroups.com'
Subject: [cfaussie] 301 redirect not changing URL



Heya,



I'm doing a 301 redirect using CFHEADER like so:



cfheader statuscode=301 statustext=Moved permanently
cfheader name=Location value=http://www.new-url.com;



The redirect correctly shows the new page content, but the URL in the 
browser window is still the old URL. If I bookmark it, its actually 
bookmarking the old URL. How can I do an SEO friendly redirect, and change 
the URL as well?



thanks.







Ryan Sabir
Technical Director

p: (02) 9274 8030
f: (02) 9274 8099
m: 0411 512 454
w: www.newgency.com http://www.newgency.com/



Newgency Pty Ltd
Web | Multimedia | eMarketing

115 Cooper St
Surry Hills NSW 2010
Sydney, Australia























--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: 301 redirect not changing URL [SOLVED]

2007-12-17 Thread Andrew Scott

Also good to know.


Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  9015 8628
Mobile: 0404 998 273



-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Ryan Sabir
Sent: Tuesday, 18 December 2007 11:27 AM
To: 'cfaussie@googlegroups.com'
Subject: [cfaussie] Re: 301 redirect not changing URL [SOLVED]


Hi all,
 
Andrew here came up with the solution:
 
You need to write the header tag like this :

cfheader statuscode=301 statustext=Moved
Permanently#Chr(13)##Chr(10)#Location:#newurl#

All in one line. Now the redirect works.. and the URL changes.

Yippee!



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---