httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Carless <>
Subject mod_rewrite and POST
Date Tue, 30 Apr 2002 16:45:05 GMT

For a variety of reasons, but primarily for the sake of keeping the
marketing department happy with 'user-readable URLs', I use mod_rewrite to
rewrite URLs of the form /section/pagename.html to the
/index.php?sn=section&pn=pagename which is used by my code.  The reasons for
doing things this precise way are a little convoluted; basically, I'm
storing actual code within my database which is then parsed by my main
'pageserver' script.

At any rate, everything works fine -- until I need to handle POST data from
a form.  My current situation is that I need to have a file upload form
submit to my pre-rewritten url, and then have the post-rewritten form be
able to do the handling of the uploaded file.  But, alas, as soon as the URL
is rewritten my POST data seems to disappear.

I suppose I *could* at a pinch have my form rewrite to index.php without the
'fancy' url.. but, assuming I do that, is it then possible for me to rewrite
the URL in the 'other direction' such that the user sees the URL as the
long-form /section/pagename.html URL?  (I realise that I could do this stuff
by simply redirecting the user once the form had been processed.  But I hate
redirects of that nature.)

I hope I'm making myself clear.. any help would be much appreciated.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message