httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabio Corazza <>
Subject Re: [users@httpd] Different ProxyPass protocols within a VirtualHost for certain files
Date Fri, 12 Dec 2003 16:20:42 GMT
Joshua Slive wrote:
> This looks like a job for mod_rewrite:
> RewriteEngine On
> RewriteCond %{REQUEST_URI} !.*\.pdf$
> RewriteRule ^/.*$1 [P]
> RewriteCond %{REQUEST_URI} .*\.pdf$
> RewriteRule ^/.*$1 [P]

It does pretty seem to be the solution. Sorry, but I don't have a deep 
knowledge about mod_rewrite, so your hint had been greatly useful.

Just to be sure I'm not misunderstanding the syntax of your directives 
at all, let me resume: you don't rewrite the URI if the file is not a 
PDF while if it is you rewrite it in HTTP. The [P] flag means to act as 
a proxy just like mod_proxy does.

> Unfortunately, you can only use a single ProxyPassReverse.  You'll
> probably want to use the https version, since it is unlikely that pdfs
> will generate a redirect that requires rewriteing.

Do you mean that, within a VirtualHost instance, I can use only a 
RewriteRule directive marked with [P] flag? If I guess right, I'll for 
sure use the https one. I'll give a try, nothing wrong with a graceful 

Thank you so much.


Fabio Corazza
espin S.p.A. - Gestione server farm
Centro Direzionale Milanofiori
Strada 3 Palazzo B2
20090 Assago (MI) - Italy

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