Mapping a domain to URI of drupal

Flavio Torres fla_torres at yahoo.com.br
Tue Jul 27 12:53:58 CEST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Em 27/7/2010 06:54, Jerais Al-Jeraisy escreveu:
> We have varnish-2.0.6 on CentOS 5.5 in front of Apache & drupal, and
> we tried to map the domain ww.xx.yy.zz to a drupal URI, like
> /websites/a/b/c, so any one can hit ww.xx.yy.zz directly insted of
> wiritng ww.xx.yy.zz/websites/a/b/c.
> it works fine for the first time, but the next time i hit the same
> URL, it directs me to the main page of drupal, not to the URI, and i
> should delete all my temp files to get it to work again.

Jerais,

I think rewrite should be useful, try this:

if (req.http.host ~ "^(www\.)?your\.domain\.com$") {
  set req.url = regsub(req.url, "^", "/websites/a/b/c");
}


regards,



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
 
iEYEARECAAYFAkxOusYACgkQNRQApncg295jDwCghEoqNx5OK4wjt4g8axxini++
JGYAoMgax11t56NJFHY/frolqg97ZQUr
=OwwC
-----END PGP SIGNATURE-----






More information about the varnish-misc mailing list