Set-Handler in <Location />

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

 



Hello, all.

I have a custom content generator. For one particular site I'd like
*all* content to come from that generator. I can, of course, configure
the generator this way:

 <Location /page>
   SetHandler zzz
 </Location>

But then *every* URL would have a '/page' prefix.

I'm wondering if it's possible to set something like this up:

 <Location />
   SetHandler zzz
 </Location>

When I've tried it so far what I see is that requests go to the
handler as expected but I've lost the first element of the path in the
path_info field. In other words, for a request to:

 /aaa/bbb/ccc

>From inside the handler I see

 path: /aaa/bbb/ccc
 path_info: /bbb/ccc

I *could* pick up the full path--but only if I assume I'm plugged in
at the root URL. Of course, I don't want to hard-code that.

I know that so far this sounds like a programming issue--and certainly
I could come up with programming solutions--but my question is really
about configuration. Is it possible, out of the box, to get any
content generator to do what I'm trying to do here--or is it just
impossible?

Some things I know:

 * I know that I can use mod_rewrite to rewrite '/' to '/page'. But
that still means that all URLs have a '/page' prefix.

 * I know that the documentation tells you to avoid overlaps between
directories and locations. In this case I effectively have no
directories--I specifically set DocumentRoot to an empty dir--but of
course an empty DocumentRoot is still a directory. So maybe there's no
configuration solution to the problem.

 * I know that simple LocationMatch patterns I've tried--like
"^/.*"--don't make a difference. (Apache still consumes the first
portion of the URL as it tries to match up the request to a file or
handler.)

 * I know that "Location /" is sometimes used for server-wide configuration.

Thanks for any help!

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