Skip to main content
Known Participant
October 2, 2008
Question

Moving Pages

  • October 2, 2008
  • 1 reply
  • 269 views
Hi,

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.

Sam.
This topic has been closed for replies.

1 reply

Inspiring
October 2, 2008
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...

hth



Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/