timtowtdi has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I’m having trouble with mod_rewrite in combination with Perl-CGI. Execution of perlscripts is working under Apache. But apparently it doesn’t execute my perlscripts when I let Apache rewrite the URL to it. Example: I have a mod_rewrite-rule that redirects www.domainname to www.domainname/cgi-bin/script.pl’ When I enter www.domainname in my addressbar, Apache returns the full sourcecode of my perlscript. When I enter the full path (www.domainname/cgi-bin/script.pl) in my addressbar, Apache executes the perlscript.
The great mistake is to anticipate the outcome of the engagement; Let nature take it's course, and your tools will strike at the right moment.
  • Comment on Apache doen't execute perlscripts which are initiated through mod_rewrite

Replies are listed 'Best First'.
Re: Apache doen't execute perlscripts which are initiated through mod_rewrite
by gloryhack (Deacon) on Oct 05, 2008 at 21:44 UTC
    You've probably got a bad rewrite rule. Do you have [T=application/x-httpd-cgi] on the end of it?