host header altered by Varnish?

Bert-Jan de Lange bert-jan at bugbyte.nl
Wed Feb 24 23:33:34 CET 2010


I have the same stuff on my backends and what you have here should work.
The only thing I can think of from your example is a missing 
'RewriteEngine on' on top. If I don't have that the rewriting is 
silently ignored by apache.


On 24-Feb-2010 22:21, John Norman wrote:
> Sorry about all the questions . . .
>
> On my backend I want to redirect domain.com <http://domain.com> to 
> www.domain.com <http://www.domain.com>
>
> I see Host: domain.com <http://domain.com> in both the RX and TX 
> sections of the log . . . but the redirect isn't getting triggered.
>
> The backend is Apache, and the redirect directives are routine.
>
>   RewriteCond %{HTTP_HOST} ^domain.com <http://domain.com>$ [NC]
>   RewriteRule ^(.*)$ http://www.domain.com$1 [R=301,L]
>
> Am I missing something?
>
> John
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at projects.linpro.no
> http://projects.linpro.no/mailman/listinfo/varnish-misc
>    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20100224/44054dde/attachment-0001.html>


More information about the varnish-misc mailing list