www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Mendenhall <...@electriciti.com>
Subject mod_rewrite/2254: RewriteRule does not allow forcing single file to application/x-httpd-cgi
Date Tue, 19 May 1998 19:31:24 GMT

>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
>Originator:     jem@electriciti.com
>Release:        1.2.5
SunOS 4.1.4 sun4c
Compiler GCC version
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.
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.
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.
[In order for any reply to be added to the PR database, ]
[you need to include <apbugs@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]

View raw message