You will need to use the following techniques:

* In Apache you will need to enable mod_rewrite module
this allows you to "remap" URI to any script, in your case you'd probably
want and request to "/news" to be mapped to for example /news.php etc.

* In your script you will need to parse the URI via the "REQUEST_URI" server

Basically what you're doing in your apache is saying: "Pass all requests to
the URI to this instead" note that this will not affect the URL display in
your browser.

This is similar technique to making search engines index your site. I've
written replies to this subject a while back check it out here:

(Note that apparently my code in this post has some problem so..)

OR a better example here:

Building Dynamic Pages With Search Engines in Mind

Revisited: Build Dynamic Pages With Search Engines in Mind


> -----Original Message-----
> From: Mike Eheler [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 4 January 2002 10:01 AM
> Subject: [PHP] User-friendly URI's
> I've seen some sites do this with other scripting languages (maybe even
> PHP.. I just don't know).. I like the look of this *way* better. Anyone
> have any insight as to how I can make that work with an Apache 1.3.xx +
> PHP 4.1.x setup?
> "news" would actually be a PHP script, of course. I know how to handle
> /2002/01/02/keyword as parameters, my question is on making "news" be
> interpreted through PHP.

PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to