.htaccess in subdir affects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

Assuming that the documentroot is ROOT and the domain is example.com.


ROOT's hierarchy is:
    ROOT/handle/
    ROOT/handle/handle.php
    ROOT/dir1/
    ROOT/dir1/.htaccess
    ROOT/dir1/some1.txt
    ROOT/dir2/
    ROOT/dir2/some2.txt
    ROOT/.htaccess


.htaccess in ROOT contains:
    DirectorySlash Off
    RewriteEngine On
    RewriteRule (.*) /handle/handle.php?arg=$1


.htaccess in dir1 contains:
    RewriteEngine On


handle.php:
<?php
    print_r($_GET);
?>


example.com/dir1 will lead to a forbidden page
example.com/dir1/some1.txt will display the contents of some1.txt
example.com/dir2 will display: Array([arg]=>dir2)
example.com/dir2/some2.txt will display: Array([arg]=>dir2/some2.txt)


The last two results are what I want, so how to remove the effect of .htaccess in subdir?
(I'm using Apache httpd 2.2.20 on Windows)


THANKS,
MIZiper

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux