[thelist] [PHP, apache] redirect with logic

Geoff Sheridan evolt at premonition.co.uk
Fri May 21 04:34:21 CDT 2004


Hello

I'd like people to type in:

http://mysite/foo/

The folder 'foo' does not exist.
Instead, a script would look up user 'foo' in a MySQL database, find 
the userID was '123' and redirect to

http://mysite/script.php?$id=123

I already have the database. How can I configure Apache/PHP to do 
this redirect? Essentially it's a matter of getting the variable 
'foo' into a php script, not a 404 - I can take it from there.

Geoff
-- 
-------------------------------------------------------
Premonition Design Ltd
http://www.premonition.co.uk/
East London, UK



More information about the thelist mailing list