You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ajay Garg <aj...@gmail.com> on 2013/09/03 21:06:17 UTC
[users@httpd] Query regarding "mod_rewrite" module when handling URLs, containing
"POST" data
Hi all.
In our setup, we need to do conditional-redirects.
Till now, we were able to accomplish them, by using a smart combination of
"RewriteCond", "RewriteRule" and "QSA".
However, we now face a situation, wherein we need to do re-directs, only if
the original-URL does not contain POST-variables/parameters (although they
may contain any number of GET-variables). Going through the "mod_rewrite"
documentation, I could not find any way to do conditional-redirect, for
URLs containing POST-variables/parameters.
Is it even possible to accomplish via HTTPD?
If yes, I will be grateful for pointers :)
Thanks and Regards,
Ajay
Re: [users@httpd] Query regarding "mod_rewrite" module when handling
URLs, containing "POST" data
Posted by Ajay Garg <aj...@gmail.com>.
Ahh.. thanks !!! :)
More specifically, we wanted the re-directions to work only for
GET-requests.
So,
RewriteCond %{REQUEST_METHOD} GET
did the trick !!!
Thanks a ton for the prompt reply :)
On Wed, Sep 4, 2013 at 12:42 AM, Daniel Gruno <ru...@cord.dk> wrote:
> On 09/03/2013 09:06 PM, Ajay Garg wrote:
> > Hi all.
> >
> > In our setup, we need to do conditional-redirects.
> > Till now, we were able to accomplish them, by using a smart combination
> > of "RewriteCond", "RewriteRule" and "QSA".
> >
> > However, we now face a situation, wherein we need to do re-directs, only
> > if the original-URL does not contain POST-variables/parameters (although
> > they may contain any number of GET-variables). Going through the
> > "mod_rewrite" documentation, I could not find any way to do
> > conditional-redirect, for URLs containing POST-variables/parameters.
> >
> >
> > Is it even possible to accomplish via HTTPD?
> > If yes, I will be grateful for pointers :)
> >
> >
> >
> > Thanks and Regards,
> > Ajay
> Here's a hint:
>
> RewriteCond %{REQUEST_METHOD} ^POST$
> RewriteRule ......
>
> With regards,
> Daniel.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
--
Regards,
Ajay
Re: [users@httpd] Query regarding "mod_rewrite" module when handling
URLs, containing "POST" data
Posted by Daniel Gruno <ru...@cord.dk>.
On 09/03/2013 09:06 PM, Ajay Garg wrote:
> Hi all.
>
> In our setup, we need to do conditional-redirects.
> Till now, we were able to accomplish them, by using a smart combination
> of "RewriteCond", "RewriteRule" and "QSA".
>
> However, we now face a situation, wherein we need to do re-directs, only
> if the original-URL does not contain POST-variables/parameters (although
> they may contain any number of GET-variables). Going through the
> "mod_rewrite" documentation, I could not find any way to do
> conditional-redirect, for URLs containing POST-variables/parameters.
>
>
> Is it even possible to accomplish via HTTPD?
> If yes, I will be grateful for pointers :)
>
>
>
> Thanks and Regards,
> Ajay
Here's a hint:
RewriteCond %{REQUEST_METHOD} ^POST$
RewriteRule ......
With regards,
Daniel.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org