>Number:         2254
>Category:       mod_rewrite
>Synopsis:       RewriteRule does not allow forcing single file to 
>application/x-httpd-cgi
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue May 19 12:40:00 PDT 1998
>Last-Modified:
>Originator:     [EMAIL PROTECTED]
>Organization:
apache
>Release:        1.2.5
>Environment:
SunOS 4.1.4 sun4c
Compiler GCC version 2.7.2.3
>Description:
We are attempting to force the standard 'printenv' script to be executed as
cgi-script in a directory with static .html documents.  We do not want to
put an extension on the file.  We want to support this in a directory
.htaccess file.  When we use the rule 'RewriteRule ^printenv$ -
[T=application/x-httpd-cgi]', the RewriteLog shows it as just passing
through, not forcing the MIME-type.  When we use the rule 'RewriteRule
^printenv$ printenv [T=application/x-httpd-cgi]', the RewriteLog states the
URLs are egual and it will ignore the rewrite.  In both cases, it prints the 
printenv code and does not execute it.
>How-To-Repeat:
Copy standard 'printenv' script to a directory that is not set up with 
ScriptAlias or SetHandler, along with the other required options for 
RewriteRules.
Put in RewriteEngine on and either of the RewriteRules listed above.
Go to the URL which indicates your printenv script.  You should just get plain 
code.
>Fix:
This may be a configuration problem; however, we are following all the 
recommendations listed for RewriteRules.
The only suggestion off the top of my head is the problem has to do with the 
hook_mimetype function, but I haven't had to time to go through it in enough 
detail.
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <[EMAIL PROTECTED]> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]



Reply via email to