Re: Loading dynamic pages based on URL
| From: | Richard Lynch | Date: | Fri, 12 Jul 2002 01:18:56 +0000 |
| Subject: | Re: Loading dynamic pages based on URL | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-107302@lists.php.net to get a copy of this message | ||
>Articles for an online magazine will use one template and load content
>dynamically from a MySQL database. Assets and images for each article will
>be stored in their own folder: e.g., www.mysite.com/topic/article
>
>Even though a physical HTML page will not exist at
>www.mysite.com/topic/article, is there a way to load the appropriate
>articles in the template without actually specifying a physical page name if
>soemone types that URL into their browser? I'd prefer to send people to
>www.mysite.com/topic/article instead of
>www.mysite.com/topic/article/template.php?id=39403848
>
>I realize this may be more of an Apache issue than PHP, but, thought I'd see
>if anyone here has dealt with something similar.
Well you still want the article ID number in the URL, right?...
mysite.com/topic/article/39403848
Then just use $PATH_INFO to snag your article ID and load up the content.
--
Like Music? http://l-i-e.com/artists.htm