|
Posted by C. on 08/07/07 12:19
On 7 Aug, 10:48, purcaholic <purcaho...@googlemail.com> wrote:
>
> If someone requests the pagehttp://www.domain.com/article/mac-windows-or-linux-who-will-tell,
> apaches mod rewrite engine will maybe pass this to an script as an
> parameter value pair like article=mac-windows-or-linux-who-will-tell.
> Now, you can execute a statement like "select * from articles where
> urltitle='mac-windows-or-linux-who-will-tell'" to get the content of
> the article. This way requires urltitles to be unique, otherwise you
> would get more results.
>
You can do this without using mod_rewrite (depending on how your
webserver is configured), if say your page is at
http://example.com/path/article.php
And the user goes to a page...
http://example.com/path/article.php/something/else/blah-blah-blah
then the same *script* will be accessed - the trailing stuff can be
found in $PHP_SELF (or some other $_SERVER vars)
HTH
C.
[Back to original message]
|