Apache Lounge



Forum Index Downloads Search Register Log in  RSS Apache Lounge

Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.



A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.

BitNami WAMP Stack

Contains ApacheLounge build

Redirecting GET Requests

Post new topic   Reply to topic    Apache Forum Index -> Coding & Scripting Corner

View previous topic :: View next topic  
Author Message

Joined: 27 Aug 2009
Posts: 9

PostPosted: Wed 02 Sep '09 10:47    Post subject: Redirecting GET Requests Reply with quote

Hey guys,

Is it possible to redirect ALL GET requests to a particular Perl script? I want all POST requests to go to one Perl script, all GET requests to go to another, and all PUT requests to go to a third Perl script.

I know how to redirect based on url, but not based on HTTP Request method. Any help in this would be muchly appreciated.


Back to top
James Blond

Joined: 19 Jan 2006
Posts: 6318
Location: Germany, Next to Hamburg

PostPosted: Thu 22 Oct '09 12:44    Post subject: Reply with quote

I know only how to redirect all requests through one file


RewriteEngine on
RewriteCond %{REQUEST_URI} !^/dispatch.pl(.*)$
RewriteRule ^(.*)$ /dispatch.pl?$1

maybe you can handle the GET / POST / PUT stuff inside your script
Back to top

Post new topic   Reply to topic    Apache Forum Index -> Coding & Scripting Corner
Page 1 of 1