Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Redirecting GET Requests |
|
Author |
|
shug94
Joined: 27 Aug 2009 Posts: 9
|
Posted: Wed 02 Sep '09 10:47 Post subject: Redirecting GET Requests |
|
|
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.
Thanks,
Cam |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 22 Oct '09 12:44 Post subject: |
|
|
I know only how to redirect all requests through one file
Code: |
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 |
|
|
|
|
|
|