Path-rewritten file with path info served (mod_rewrite & AcceptPathInfo Off)

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

 



I have set AcceptPathInfo Off, yet I receive the file in question when it's served through
rewritten path using mod_rewrite, as if I had AcceptPathInfo On.
This doesn't seem to be the correct behavior, am I missing something?

(Using Apache 2.2.17 from Arch Linux repositories with shipped configuration,
only change was AllowOverride All.)


### Test case 1/2
GET http://localhost/testdir/txt-file/XYZ/
A direct request to the file is made with additional path info (/XYZ/).
Result: 404.

### Test case 2/2
Request the file matching RewriteCond with additional path info (/XYZ/). Rewrite rules below.
GET http://localhost/txt-file/XYZ/
Result: The file "txt-file" is served.


### .htaccess
RewriteEngine On
Rewritebase /
AcceptPathInfo Off

RewriteCond %{REQUEST_URI} !^/testdir
RewriteRule ^(.*)$ /testdir/$1


### File structure
[FILE] WWW-root/.htaccess 
[DIR ] WWW-root/testdir/
[FILE] WWW-root/testdir/txt-file


[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