1 Reply Latest reply on Oct 2, 2008 2:30 AM by Newsgroup_User

    Moving Pages


      I'm about to reshuffle the content on a large coldfusion website. This will mean that most pages will move into new directories.

      We have a lot of people linking into our pages and I don't want to break these links.

      Is there any way of detecting the old URL of a page a redirecting them to the new URL?

      Thanks in advance for any help and advice.

        • 1. Re: Moving Pages
          Level 7
          many ways to skin a cat...

          you could keep the old pages but replace their content with <cflocation>
          to new pages with statuscode="301"

          you could keep the old pages and set up a permanent redirect for them in
          your web server

          you could create a db table that stores the old and corresponding new
          file names/locations and query this db in your onMissingTemplate()
          method in application.cfc;
          or similarly you could create a structure in application scope with old
          page name as key and new page name as value and parse that in your
          onMissingTemplate() method
          (you do not need to keep the old pages for this method)

          depending on your file naming conventions there may be a way to deduce
          the new file name from the old one... then you do not need a db or
          structure and could just write the deduction logic into the
          onMissingTemplate() method...


          Azadi Saryev