[thelist] Directory style query strings without using mod_rewrite

Simon Coggins ppxsjc1 at unix.ccc.nottingham.ac.uk
Wed Jul 18 11:24:22 CDT 2001


> Basically as the subject says, I want to mask query strings as directory
> style URL's but cant use mod_rewrite.
> 
> Does anyone know how this would be done?
> Server is PHP/Apache.

You can kind of fake this effect using the $PATH_INFO variable which is
sent by apache. If you request the file:

http://www.myserver.com/index.php/url/string/here

the file index.php will have a variable $PATH_INFO available to it with
the value "/url/string/here". You can then extract the info you need
from the string. The downside is that you still have index.php in the url

Hope that helps,

Simon





More information about the thelist mailing list