We would like to get pretty URLs with Escenic like those we have now. They look like this: http://hd.se/perstorp/2008/04/09/vaerd-riskerar-boeter-foer/ In a more generic form it's: http://hd.se/
/YYYY/mm/dd// * Section might be "foo" aswell as "foo/bar" or even "foo/bar/2008" * YYYY/mm/dd is the article's publish date in this section * The last part is generated from the title We do NOT want to put in anything in the URL that's not bearing information for the end user. That includes databas IDs and useless filename extensions. Once an article is published the URL MUST NOT change even if the title is changed. We want truly persistant URLs. Even for articles which once have been published and then are revoked, should present the visitor with something that at least says the requested article has been removed. To implement this, we were thinking of adding a "publish"-hook that, whenever an article is published, does: * If the article's friendly URL is not yet set, continue, else abort * Start off by building an URI like "/foo/2008/04/09/bar/" from the article's main section, it's publish date and it's title * If the built URI is conflicting with an existant one, modify it until it doesn't conflict * Store it in a persistant shared storage (MySQL?) along with it's Escenic ID * Store the URI/Escenic ID in memcached (and ignore any errors) On the presentation servers we'd like to introduce a filter that basically does: * Extract the URI from the request * Fetch Escenic ID by querying memcache for the value associated with the URI and, if found, return answer * If not found or error, lookup from persistant shared storage (MySQL) * Store answer in memcached (and ignore any errors) * Return answer Do you see any apparent errors in this proposed solution? Would there be any problems when it comes to building templates since we need to get ahold of the URI for the article? Could something like this be done with existing Escenic functionality?