I configure my virtual server: # bug.mj41.cz <VirtualHost *:80> ServerName bug.mj41.cz # etc <Location /dir> RemoveHandler .php ForceType text/plain </Location> <Location /dir/subdir> RemoveHandler .php ForceType text/plain </Location> </VirtualHost> I put the same 'index.php' to directories '/' '/dir/' '/dir/subdir' (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 " <?php echo "php runs\n"; ?> ". Server runs Apache/2.0.52 (CentOS).
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.
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.