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
-~----------~----~----~----~------~----~------~--~---

Reply via email to