httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Galić <i.ga...@brainsware.org>
Subject Re: [users@httpd] Path-rewritten file with path info served (mod_rewrite & AcceptPathInfo Off)
Date Sun, 28 Nov 2010 21:46:39 GMT

----- fictive@sci.fi 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@brainsware.org
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message