You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by Vincent Bray <no...@gmail.com> on 2007/08/09 17:20:47 UTC

Mapping requests to handler without rewrite

Hi,

I wrote http://wiki.apache.org/httpd/RewriteVirtualHandler with the
intention of answering common questions that are typically answered
with mod_rewrite solutions, without needing mod_rewrite. The two
examples using Action:

<Location />
 Action foo-action /script.php virtual
 SetHandler foo-action
</Location>

.. and ..

<Location />
 Action foo-action /script.php
 SetHandler foo-action
</Location>

.. both loop. I've tried using <LocationMatch (?!script.php)> to avoid
the loop, as LocationMatch doesn't support negation (as far as I can
tell), but that doesn't stop it.

Can anyone see a way for me to have my cake and eat it? Or shall I
just replace those examples with RewriteRules?

-- 
noodl

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: Mapping requests to handler without rewrite

Posted by Joshua Slive <jo...@slive.ca>.
On 8/9/07, Vincent Bray <no...@gmail.com> wrote:
> Hi,
>
> I wrote http://wiki.apache.org/httpd/RewriteVirtualHandler with the
> intention of answering common questions that are typically answered
> with mod_rewrite solutions, without needing mod_rewrite. The two
> examples using Action:
>
> <Location />
>  Action foo-action /script.php virtual
>  SetHandler foo-action
> </Location>
>
> .. and ..
>
> <Location />
>  Action foo-action /script.php
>  SetHandler foo-action
> </Location>
>
> .. both loop. I've tried using <LocationMatch (?!script.php)> to avoid
> the loop, as LocationMatch doesn't support negation (as far as I can
> tell), but that doesn't stop it.
>
> Can anyone see a way for me to have my cake and eat it? Or shall I
> just replace those examples with RewriteRules?

You might try
<Location /script.php>
SetHandler php-script
</Location>
either before or after the existing <LocationMatch>.

But that is just a guess.

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org