Bug 44031 - RemoveHandler inside subdir location
Summary: RemoveHandler inside subdir location
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_mime (show other bugs)
Version: 2.0.55
Hardware: PC Linux
: P2 major (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2007-12-06 04:12 UTC by Michal Jurosz
Modified: 2007-12-06 07:22 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Michal Jurosz 2007-12-06 04:12:22 UTC
I configure my virtual server:

# bug.mj41.cz
<VirtualHost *:80>
    ServerName bug.mj41.cz
    # etc

    <Location /dir>
       RemoveHandler .php
       ForceType text/plain
    <Location /dir/subdir>
       RemoveHandler .php
       ForceType text/plain

I put the same 'index.php' to directories
(inside DocumentRoot).

Result for http://bug.mj41.cz/index.php and
http://bug.mj41.cz/dir/index.php are ok.

But what about result of http://bug.mj41.cz/dir/subdir/index.php ?
'dir/subdir/index.php' output is
php runs

so it is not same as that of 'dir/index.php' which is

echo "php runs\n";


Server runs Apache/2.0.52 (CentOS).
Comment 1 Nick Kew 2007-12-06 06:21:40 UTC
Use <Directory> not <Location> for local contents.  Otherwise you WILL get
unexpected results, as you just found out.

Please use a user support forum for configuration questions.
Comment 2 Michal Jurosz 2007-12-06 07:22:17 UTC
Thanks for response. I tried Directory too (My configuration tested with 'deny
from all'). Same effect.

Another ideas? Thanks.

BTW: I posted this to apache-httpd-users (
http://marc.info/?l=apache-httpd-users&m=119307867828784&w=2 ), but nobody answered.