You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Stephen Reppucci <sg...@logsoft.com> on 2002/03/12 16:51:58 UTC
Precedence of Actions
(Apache 1.3.22, Linux 2.4.17)
I'm trying to cleanup the url space of a site. This site previously
had a setup something like so (not setup by me...):
/cgi-bin/download.cgi -- the main download index script
/cgi-bin/download/prodA.cgi -- the download script for product A
/cgi-bin/download/prodB.cgi -- the download script for product B
etc.
I've tried to set things up with 'Action' and 'SetHandler'
directives so that my url space looks more like:
/download -- the main download index script
/download/prodA -- the download script for product A
/download/prodB -- the download script for product B
etc.
So, my conf file now looks like so:
Action my-download-prodA /cgi-bin/download/prodA.cgi
<Location /download/prodA/>
SetHandler my-download-prodA
</Location>
Action my-download-prodB /cgi-bin/download/prodB.cgi
<Location /download/prodB/>
SetHandler my-download-prodB
</Location>
Action my-download /cgi-bin/download.cgi
<Location /download/>
SetHandler my-download
</Location>
The problem I'm having is that the top level Action (my-download) seems
to be invoked for *any* access under the /download url-space. I.e., the
'/cgi-bin/download.cgi' script gets invoked for both '/download' and
'/download/prodA' (and '/download/prodB', etc.) urls.
I've tried reordering the appearance of the directives so that the
'/download' url appears first in the conf file, with no results.
Can anyone offer hints as to whether this is possible, and if so, what
I'm doing wrong here?
Thanks.
--
Steve Reppucci sgr@logsoft.com |
Logical Choice Software http://logsoft.com/ |
=-=-=-=-=-=-=-=-=-=- My God! What have I done? -=-=-=-=-=-=-=-=-=-=
---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org
Re: Precedence of Actions
Posted by Stephen Reppucci <sg...@logsoft.com>.
Thanks for the reply, but RemoveHandler takes a file-extension as
its parameter, that's not what I'm adding the handler based on (it's
location based, not based on suffix...)
(Actually, I hadn't even realized that 'RemoveHandler' existed, but
reading the docs, it doesn't appear that it'll do what I want.)
I'll try the LocationMatch idea though, that might well be the
ticket. It still puzzles me why the Location directives don't work
though -- the docs sure imply that the directives in the longer
location match should take precedence.
Thanks for the ideas.
<Steve Reppucci>
On Tue, 12 Mar 2002, Joshua Slive wrote:
> Stephen Reppucci wrote:
> > (Apache 1.3.22, Linux 2.4.17)
> >
> > I'm trying to cleanup the url space of a site. This site previously
> > had a setup something like so (not setup by me...):
> >
> > /cgi-bin/download.cgi -- the main download index script
> > /cgi-bin/download/prodA.cgi -- the download script for product A
> > /cgi-bin/download/prodB.cgi -- the download script for product B
> > etc.
> > The problem I'm having is that the top level Action (my-download) seems
> > to be invoked for *any* access under the /download url-space. I.e., the
> > '/cgi-bin/download.cgi' script gets invoked for both '/download' and
> > '/download/prodA' (and '/download/prodB', etc.) urls.
>
> I'm not sure about the solution, but here are some ideas:
>
> - Try using the RemoveHandler directive in the more specific <Location>
> sections.
>
> - Try using a more restrictive <LocationMatch> section.
>
> Joshua.
--
Steve Reppucci sgr@logsoft.com |
Logical Choice Software http://logsoft.com/ |
=-=-=-=-=-=-=-=-=-=- My God! What have I done? -=-=-=-=-=-=-=-=-=-=
---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org
Re: Precedence of Actions
Posted by Joshua Slive <jo...@slive.ca>.
Stephen Reppucci wrote:
> (Apache 1.3.22, Linux 2.4.17)
>
> I'm trying to cleanup the url space of a site. This site previously
> had a setup something like so (not setup by me...):
>
> /cgi-bin/download.cgi -- the main download index script
> /cgi-bin/download/prodA.cgi -- the download script for product A
> /cgi-bin/download/prodB.cgi -- the download script for product B
> etc.
>
> The problem I'm having is that the top level Action (my-download) seems
> to be invoked for *any* access under the /download url-space. I.e., the
> '/cgi-bin/download.cgi' script gets invoked for both '/download' and
> '/download/prodA' (and '/download/prodB', etc.) urls.
I'm not sure about the solution, but here are some ideas:
- Try using the RemoveHandler directive in the more specific <Location>
sections.
- Try using a more restrictive <LocationMatch> section.
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
For additional commands, e-mail: users-help@httpd.apache.org