|
Posted by Erwin Moller on 11/17/81 11:34
frizzle wrote:
> Hi Group,
>
> I'm builiding a sort of a news-site, with a mySQL backend.
> Nowadays, i come across a lot of news-pages with the
> title of the article in the URL. For example this one:
> http://www.nieuwnieuws.nl/ (dutch in this case)
>
Geeft niks. Mooie taal.
> Anyway, every article seems to have it's own html-page.
> I know that the page in my example actually has php-pages and
> a mysql-db.
>
> In my own site, i use htaccess to simulate directories and everything,
> but what i wonder is how THIS system works.
> If site.com/news/hot_news.html is converted to
> site.com/news.php?article=hot_news,
Probably yes.
> Does this mean that the PHP looks in the DB "WHERE article =
> 'hot_news'" ?
Maybe. Hard to say.
Maybe the hot_news is something special, like a collection of articles.
> Meaning it looks for a piece of text instead of an actual id?
I agree. A good databasedesigner/webappbuilder would avoid full text
substringsearch wherever possible.
But maybe the receiving script checks for special cases like 'hot_news' and
will respond accordingly.
For example: If it is an integer: get the article, if it is a special
string, do something else.
>
> Wouldn't it mean the queries would be extremely slow?
>
> I hope my question is clear, since i don't exactly know how to explain.
>
> Thanks, Frizzle.
google for mod_rewrite
I expect such a module is behind it.
Regards,
Erwin Moller
Navigation:
[Reply to this message]
|