Does anyone know of a good TinyURL solution?

I am working on moving the NTP website into Percussion (http://ntp-server.niehs.nih.gov/). We presently have a database table look up in a Cold Fusion FarCry CMS to map the existing short urls to page IDs. But in Percussion the pages will be published in a folder structure. I need to figure out a way of associating short urls to the new folder path site structure. Querying the Percussion database will not work because the relationships make the database query takes too long to do it on the fly.

Does anyone have any good ideas of how to do this with a Percussion implementation?

Is that change to the folder layout by design? The reason I ask is that one approach could be to create a location scheme that mirrors the existing short url layout.

Another option would be to publish a redirect for the old short locations that map to the new location, what type of web server are you publishing to?

-n

[QUOTE=mcolebank;20953]I am working on moving the NTP website into Percussion (http://ntp-server.niehs.nih.gov/). We presently have a database table look up in a Cold Fusion FarCry CMS to map the existing short urls to page IDs. But in Percussion the pages will be published in a folder structure. I need to figure out a way of associating short urls to the new folder path site structure. Querying the Percussion database will not work because the relationships make the database query takes too long to do it on the fly.

Does anyone have any good ideas of how to do this with a Percussion implementation?[/QUOTE]

There was no folder structure in FarCry. The FarCry CMS just queries a database and returns a dynamic page. The existing shorturl is built into the FarCry CMS. I think we are going to export out a list of all the page content ID’s and the jcr path and then map the list of preexisting short urls to the paths and IDs. We are publishing to an Apache server.

We are looking at up to 100,000 redirects for 15,000-20,000 pages and files.

Thanks.

[QUOTE=natechadwick;20954]Is that change to the folder layout by design? The reason I ask is that one approach could be to create a location scheme that mirrors the existing short url layout.

Another option would be to publish a redirect for the old short locations that map to the new location, what type of web server are you publishing to?

-n[/QUOTE]

What is the format of the redirect URL?

Also, are new redirects being added over time or is it a one time thing?

If it is a one time thing you could write out a configuration (conf file) snippet for Apache that contains all of the redirects in it as mod_alias directives.

If it is ongoing and they will be maintained within CM System you could do something like create a Redirect or ShortURL content type and template with a ‘Redirect To’ slot on it. Have the template write out a PHP snippet in the Velocity page template for the Short URL type, using whatever url pattern you currently have (location scheme), and have the PHP send the 301 to the location of the slotted item. Note you would need to turn on ForceType application/x-httpd-php for the directory the short urls get published to assuming the short URLS had no file extension.

-n