[thelist] Directory style query strings without using mod_rewrite

Martin Kuplens-Ewart martin at takingitglobal.org
Wed Jul 18 11:31:33 CDT 2001


 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>> 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  

- ---------------------------------------

You can get rid of the downside, by setting php to parse any file
without an extension... Not sure how you'd do that... Hehe... That
way you get something like:
http://updates.takingitglobal.org/xml/martin83

Where xml is actually the php file.. Martin83 is the variable that it
sucks out like marrow from a bone. :P

- -martin

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBO1W55/BkKbnuftUkEQKICACg3Tc80m20HbIPFHweP5SKYF54LXgAoPRv
YG5wJKZmZ9Hcsu84pR4Ox/ga
=WeRk
-----END PGP SIGNATURE-----





More information about the thelist mailing list