Mod rewrite and POST request

Hi,

I'm having the following rewrite rules:

RewriteRule ^post/login/$ post_processing.php?page=login
RewriteRule ^post/login$ /www/post/login/ [R]

If I request http://server/post/login it gets rewritten to
http://server/post/login/ but by then the POST request has become a
GET request.

I was wondering if this could be done without loosing the http POST
information?

Cheers
pieter.thoma [ Mo, 14 Januar 2008 10:19 ] [ ID #1907348 ]

Re: Mod rewrite and POST request

<pieter.thoma [at] gmail.com> wrote in message
news:baaeb094-15c1-4443-9097-a7ae0c8be4cb [at] s13g2000prd.google groups.com...
> Hi,
>
> I'm having the following rewrite rules:
>
> RewriteRule ^post/login/$ post_processing.php?page=login
> RewriteRule ^post/login$ /www/post/login/ [R]
>
> If I request http://server/post/login it gets rewritten to
> http://server/post/login/ but by then the POST request has become a
> GET request.
>
> I was wondering if this could be done without loosing the http POST
> information?
>
The second rule will force apache to respond with a 302 redirect, this will
tell the browser to change POST to GET (there is no way to redirect a POST
as a POST).

Why don't you just POST to the correct location in the first place?
phantom [ Mo, 14 Januar 2008 10:47 ] [ ID #1907349 ]
Webserver » alt.apache.configuration » Mod rewrite and POST request

Vorheriges Thema: [STAT] Statistics of alt.apache.configuration 01/14/08
Nächstes Thema: xampp apache vhosts setting (linux) - help help !!!!