httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <>
Subject Re: [users@httpd] desperately seeking help rewriting proxy requests
Date Wed, 16 Feb 2005 09:54:13 GMT
Brian Bennett wrote:

> I have a number of proxy servers that are available via subscription. 
> So they're regular normal proxies, nothing wierd.  I need to block
> certain URL's from being proxied.  E.g., deny all access to
> or formail.cgi from the proxy.

I thought that looked Bad.  Until I saw your .sig - it's presumably a
special-purpose proxy.

> Basically, I started out with this:
> RewriteEngine On

Unnecessarily complicated.

> If I send a non-proxy request to apache for /formmail it returns a 403
> error, as it should.  However if I send a proxy request for
> it gets ignored by mod_rewrite (it
> doesn't even show up in the rewrite.log), and the request is passed to
> the remote site.

<LocationMatch things-with-formmail-in>
	Deny from lusers

Now you can even put that in a <Limit POST>, and avoid accidentally
catching a URL that happens to contain the string.

> I have also tried wrapping the RewriteRule within <Directory
> proxy:*></Directory> tags.

A directory is by definition local to your server.

Nick Kew

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message