Re: [phplib] help Implementing dynamic paths From: Layne Weathers (layne <email protected>)
Date: 05/24/01

> I need to implement dynamic path to evoid using some get vars
> in my URL,

You can use the Apache PATH_INFO environment variable to replace get vars.
Let's say my script is at <my.domain/script.php> - if I construct a URL like
<my.domain/script.php/some/arbitrary/stuff/here/>, everything after
script.php will be in the PATH_INFO. <? $path_info = getenv('PATH_INFO'); ?>
After that I examine the parts of the PATH_INFO and build my page
accordingly.

In addition, I can use Apache's SetHandler directive to make
application/x-httpd-php my default, rename script.php to script, and then
use <my.domain/script/some/arbitrary/stuff/here/> so that awkward .php isn't
in the middle of my URL.

Layne Weathers
Ifworld, Inc.

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>