Legacy URLs in custom field?
Posted: 17 November 2005 11:53 PM   [ Ignore ]  
Lab Assistant
RankRank
Total Posts:  110
Joined  11-17-2005

I’m thinking about using EE for a client with a very large amount of content currently in static pages. Over the years their URL conventions have changed, and it seems logical to completely overhaul the URLs at the moment that the content is imported. Nevertheless many of their pages are linked externally and they would rather that those links continue to function rather than return 404s. My idea is that when I’m coding up some scripts to import their old content, I’d have the legacy URL or an article stored in an (indexed) custom field. EE would then search that field for a match before returning a 404. Is that something that sounds possible?

I’m sure there must be a more elegant solution to this problem—does anyone have any ideas?

Many thanks,
Rob

Profile
 
 
Posted: 18 November 2005 01:01 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  16154
Joined  05-15-2004

You’ll want to look into mod_rewrite. More power with less (well, that’s somewhat iffy, OK) hassle.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 18 November 2005 01:21 AM   [ Ignore ]   [ # 2 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  567
Joined  07-22-2004

..as Ingmar said, mod_rewrite is probably the best solution.

Otherwise you could do as you said and add some php code to the
EE 404-template that redirects the visitor to the correct EE article,
if the corresponding url is found in a custom field. It’s doable.


best
:: andy

 Signature 

ExpressionEngineer - custom solutions for EE

I EE

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 66397 Total Logged-in Users: 40
Total Topics: 84732 Total Anonymous Users: 15
Total Replies: 454742 Total Guests: 209
Total Posts: 539474    
Members ( View Memberlist )
Newest Members:  Liju.Btom2000kalkalmohanraoelcisyncronosDan Kingsburypaulgoodeanugrah1986gregandkari