You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Michael Johnson <mj...@pitsco.com> on 2003/07/22 22:30:10 UTC

[users@httpd] Sending directory trees to a single file

Hello all.

This is a problem and not a problem for me. Apache is doing what I want, 
but I don't know how. The reason I'm posting is to see if I can figure out 
how and why Apache is doing what is.

I have a single script (in PHP, incidentally) that I want to have process 
all the files in a designated directory tree. For example, I want

  http://example.com/path/script/paramter/or/something

to be handled by
 /docroot/path/script.php

I have a script2 in the same directory as script that I want to be handled 
similarly.

I have been using mod_rewrite to do similar things so I took that approach 
with this. But when I decided to move the .htaccess file implementing the 
rewrite I took it temporarily out of service. And the links still worked as 
I wanted!

I can't find anything that does this besides mod_rewrite. I searched the 
documentation and online via Google. And since I pulled the .htaccess files 
out (rm'd them!) I don't know why this is working. I do have the MultiViews 
option turned on. Does that maybe have something to do with it?

Don't get me wrong, I'm happy with the way things are functioning. However, 
this project will be distributed to different setups and I need to know 
what configuration is required to get the functionality.

Thank you very much,
Michael

-- 
Michael Johnson < mjohnson@pitsco.com >
Internet Application Programmer, Pitsco, Inc.
620-231-2424x516

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


Re: [users@httpd] Sending directory trees to a single file

Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 23 Jul 2003, Michael Johnson wrote:

> I understand the Options MultiViews, I've been using it just for that
> purpose. What I don't understand is the 'standard handling of PATH_INFO'.
>
> I am using 1.3.x which doesn't appear to have AllowPathInfo (not that I can
> find). Is it always on in 1.3? Or am I missing something? I haven't
> witnessed it before nor seen it documented. If it's always on I don't have
> to worry about it, and that's good. Like I said, I just need to be able to
> duplicate the behavior on other servers.

It is a standard feature of CGI and is documented in the CGI
specification.  It is always on for dynamic content in 1.3.  In 2.0, you
need to read the AllowPathInfo documentation to see how it works.

Joshua.

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


Re: [users@httpd] Sending directory trees to a single file

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, 22 Jul 2003, Michael Johnson wrote:
> I have a single script (in PHP, incidentally) that I want to have process
> all the files in a designated directory tree. For example, I want
>
>   http://example.com/path/script/paramter/or/something
>
> to be handled by
>  /docroot/path/script.php
>
> I have a script2 in the same directory as script that I want to be handled
> similarly.
>
> I have been using mod_rewrite to do similar things so I took that approach
> with this. But when I decided to move the .htaccess file implementing the
> rewrite I took it temporarily out of service. And the links still worked as
> I wanted!
>
> I can't find anything that does this besides mod_rewrite. I searched the
> documentation and online via Google. And since I pulled the .htaccess files
> out (rm'd them!) I don't know why this is working. I do have the MultiViews
> option turned on. Does that maybe have something to do with it?

This is a combination of "Options Multiviews" (which eliminates the need
for the extension) and standard handling of PATH_INFO (the stuff after the
real name of the script gets put in that env variable).  In 2.0, see the
directives Options, AllowPathInfo, and MultiViewsMatch.

Joshua.

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