httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
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 formail.pl
> 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
> http://www.somesite.com/formmail 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
</LocationMatch>

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


Mime
View raw message