httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hicks <johnl...@gulfbridge.net>
Subject Re: [users@httpd] mod_rewrite vs Content Management Systems
Date Sun, 07 Aug 2005 18:35:50 GMT
David Blomstrom wrote:
> I want to create a content management system that
> produces user/search engine-friendly URL's like these:
> 
> www.geozoo.org/stacks/Carnivora/
> www.geozoo.org/kids/Carnivora/
> www.geozoo.org/stacks/Canidae/
> www.geozoo.org/kids/Canidae/
> www.geozoo.org/stacks/Canis_lupus/
> www.geozoo.org/kids/Canis_lupus/
> 
> As you can see, there will be two versions of each
> article, one for adults, the other for kids.
> 
> I think this is done with Apache's mod_rewrite
> function, right? 

mod_rewrite can do a good job of translating urls like the above into 
something like this:

www.geozoo.com/?Audience=kids&Subject=Carnivora
etc.

which most any CMS can go to town with.

. . .

> One other question: I read somewhere that you can
> actually produce several URL's for one article. For
> example, an article about the wolf might be accessed
> at any of the following:
> 
> www.geozoo.org/stacks/wolf/
> www.geozoo.org/stacks/Canis_lupus/
> www.geozoo.org/stacks/top_predator/
> 
> I think I read about this on Plone's website, but
> Plone is way over my head. Is this something you can
> do with mod_rewrite or some other technology that
> isn't restricted to a particular CMS? Can it be done
> with a database? (I'll have the wolf listed under
> wolf, Canis_lupus, top predator, etc.)

mod_rewrite uses regular expressions. You'd only need a few to do the 
basic job. But if you want to do rewrites based on particular subjects, 
the list of rewrite rules would get way longer and maintenance (of 
regular expressions) would be a bear.

Assuming you have a pretty long assortment of critters, you'd do better 
to do this with your CMS using a database. This probably involves using 
an extra table: a Subject table that points to an Article table, for 
example, so you can have multiple subjects pointing to the same article.

Hope that helps.

John Hicks

> 
> Thanks.
> 
> 
> 
> 		
> ____________________________________________________
> Start your day with Yahoo! - make it your home page 
> http://www.yahoo.com/r/hs 
>  
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message