• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Moving Pages

New Here ,
Oct 02, 2008 Oct 02, 2008

Copy link to clipboard

Copied

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.
TOPICS
Advanced techniques

Views

224

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 02, 2008 Oct 02, 2008

Copy link to clipboard

Copied

LATEST
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/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation