[HLUG] CMS suggestion - specific issue

John Hedges john at drystone.co.uk
Wed May 6 09:31:52 UTC 2009


On Tue, May 05, 2009 at 09:26:12PM -0000, paul at vintage-radio.com wrote:
> Hi,
> 
> I am looking to move two websites from static pages to CMS.  However the 
> sites have good Google placings and I do not want to break all the 
> existing URLs.
> 
> My usual CMS is Website Baker which generates the URLs by creating files 
> for each page based on the menu structure to the page, and puts them all 
> within a pages/ directory.  So the URL for an About Us page in the 
> Information section would be 
> www.domain.com/pages/information/about-us.php  However on the existing 
> website it could be www.domain.com/about.php (fortunately I did use .php 
> extension).
> 
> I am looking for a CMS which lets the user specify the URL separately to 
> the menu structure to the page, and also doesn't require them all to be 
> within a pages/ directory.  So that I could specify that the About Us 
> page URL is www.domain.com/about.php and it accepts that (as long as it 
> doesn't clash with some other existing file).
> 
> Apart from that, I need something where the templates are basically PHP 
> files with bits added for the CMS content, and the content stored in a 
> MySQL database.
> 
> Can anyone suggest anything that would do what I need?  Or should I set 
> about hacking Website Baker to do it?  Website Baker does store the URL 
> in a separate "link" field in the database, and if I edit this and 
> rename the file everything still works.  So I think it should be 
> hackable, though it may not be very pretty!
> 
> I'd also need to get rid of the /pages/ directory, but that is a 
> configuration option.
> 
> Thanks!
> Paul

Hi Paul

Instead of hacking Website Baker you could let your webserver handle the name
changes for you. I've done this in the past to keep people's bookmarks working
after restructuring sites. You can either return redirects from the server
which cause the browser to look at the new url for the resource or you can use
aliases, where the server treats the old and new url in the same way. In apache
these could be:

    Redirect permanent /about.php http://www.domain.com/pages/information/about-us.php

    Alias /about.php /pages/information/about-us.php

http://httpd.apache.org/docs/2.2/mod/mod_alias.html

Of course, this might not be practical if you've thousands of pages.

Cheers
John




More information about the Herefordshire mailing list