You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Abhinav (Cognizant)" <Ab...@cal.cognizant.com> on 2003/09/15 06:57:13 UTC
[users@httpd] Proxy Filter
We can use ProxyPass to filter and froward requests to another server
based on the URL. Can we do a similar thing on the basis of MIME-TYPE
e.g if the request is for a gif file, the webserver serves it and if its for
any other type forwards it to the other server.
Re: [users@httpd] Proxy Filter
Posted by Joshua Slive <jo...@slive.ca>.
On Mon, 15 Sep 2003, Abhinav (Cognizant) wrote:
> We can use ProxyPass to filter and froward requests to another server
> based on the URL. Can we do a similar thing on the basis of MIME-TYPE
> e.g if the request is for a gif file, the webserver serves it and if its for
> any other type forwards it to the other server.
I don't believe this is theoretically possible, since the mime-type can't
be known until you have the document.
But what you probably want is to proxy requests with certain file
extensions. This can certainly be done with mod_rewrite. For example:
RewriteEngine On
RewriteRule (.*)\.gif$ http://internal.example.com/$1\.gif [P]
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
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org