The script is called by lots of clients on different web servers So I cannot easily change the location of the script to /perl/
An easy fix or so I thought was to rewrite the url using mod rewrite so that the server would look for the script in the correct directory (/perl/) rather than the requested directory (/cgi-bin/)
I inserted this into httpd.conf in the virtual server configuration
<code>#redirect mlserver requests to the faster mod_perl
RewriteEngine on
RewriteRule ^/cgi-bin/mlserver.pl(.*) /perl/mlserver.pl$1</code>
Bonza it worked
But then I realised it was still running under CGI not mod_perl!
Now I cannot find a way to get the script running under mod_perl. CGI always
takes over!
If I remove the shebang line the script fails
If I call it directly ie: server.com/perl/mlserver.pl it works correctly under
mod_perl
How can I redirect an incoming request to the new mod_perl script?
I know this question is probably more an apache one, but I hope someone here can assist
I have tried renaming the script to mlserver.perl and the setting a new handler
ie: AddHandler perl-script .perl
but all that does is send back plain text, it doesn't execute mod_perl at all
Any ideas apart from telling all my clients to change the code on hundreds of sites?
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |