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

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

 



----- fictive@xxxxxx wrote:

> 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.)

quoting the #httpd bot
<fajita > a really bad idea, because it implies AllowOverride Options,
which lets people do stuff like Options FollowSymlinks and
Options ExecCGI, even though they are explicitly disabled in the
main config.


> ### 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.
> 
> 

> RewriteEngine On
> AcceptPathInfo Off
> RewriteCond %{REQUEST_URI} !^/testdir
> RewriteRule ^(.*)$ /testdir/$1

put this in vhost context.
Enable RewriteLog, post the results.

See this presentation:
http://people.apache.org/~rbowen/presentations/Apache_Nuts_Bolts_files/Apache_Nuts_Bolts.079.jpg
through
http://people.apache.org/~rbowen/presentations/Apache_Nuts_Bolts_files/Apache_Nuts_Bolts.115.jpg

To see how to make RewriteLog humanly readable.

i

-- 
Igor GaliÄ

Tel: +43 (0) 664 886 22 883
Mail: i.galic@xxxxxxxxxxxxxx
URL: http://brainsware.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-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