4 Replies Latest reply on Mar 13, 2014 12:33 AM by BKBK

    CFLOCATION question

    weezerboy Level 1

      I have urls that have been changed and I need to relocate users to the new url.

       

       

      I have been using this code.

       

        <cfif PATH_TRANSLATED CONTAINS "C:\inetpub\websites\mywebsite\abc\">

      <cflocation url="http://www.mywebsite.com/newsite/abc/#pagename#">

      </cfif>

       

      This code works but anytime I add a new page to newsite I also need to add a copy of the page to the old site or a get a 404 error.

       

      Is there a way I can say if a user comes to my site to this url  http://www.mysite.com/abc/thispage.cfm that they can be automatically redirected to

       

      http://www.mysite.com/newsite/abc/thispage.cfm?

       

      Basically redirect to the pagename in the new directory without having the page at the old location also.