You are here: Re: clean urls mod_rewrite and mysql...howto « PHP Programming Language « IT news, forums, messages
Re: clean urls mod_rewrite and mysql...howto

Posted by Toby A Inkster on 08/07/07 12:32

purcaholic wrote:

> P.S.: You can also dive into the core of some blogs, cms, etc. to find
> out, how they solved this...

I'm sure that the very first CMS you'd investigate would be demiblog
<http://demiblog.org> ;-)

demiblog uses roughly the technique that purcaholic describes. Blog
articles are given URLs like '/blog/YYYY/MM/DD/FOOBAR/' and the relevant
fields in the database are:

article_date timestamp
url_part varchar

So when, say, the URL in my signature is visited, the CMS will search for
blog articles with article_date='2007-08-02' AND
url_part='command-line-again'. This way the article_date can be different
from the date the article was first created on, and different from its
last-modified date, and the url_part can be different from the
article_title, which is often useful if you have a post with a really long
title, but don't want your URL to be too long!

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 47 days, 16:04.]

Command Line Interfaces, Again
http://tobyinkster.co.uk/blog/2007/08/02/command-line-again/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация