Question concerning rewriting browser address bar
Shibashish
shib4u at gmail.com
Fri Jul 1 14:12:42 CEST 2011
On Fri, Jul 1, 2011 at 5:35 PM, David Theis <david.theis at wetteronline.de>wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi everybody,
>
> i'm getting right to my question:
> if a user contacts one of our proxy servers using only the ip address
> i'd like to rewrite this ip address into a domain name, so that the user
> sees www.domainname.de instead of e.g 10.0.0.2 in his/her browser
> address bar. is this possible with varnishd ?
>
> We're using freebsd-7.4-RELEASE + varnish 2.1.5 !
>
> mfg
> David
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.17 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk4NuA0ACgkQu/Z5Qo6690XlYACgj2or4DFsYSxMiAUPoTRjr9y0
> xWQAoJSW112qam6BUixSZjwEibsLMLY0
> =hw0m
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
in vcl_recv
if (req.http.host ~ "11.22.33.44"){
error 750 "http://www.domain.com"; }
sub vcl_error {
if (obj.status == 750) {
set obj.http.Location = obj.response req.url;
set obj.status = 301;
return(deliver);
}
}
--
Shib
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110701/274468df/attachment-0003.html>
More information about the varnish-misc
mailing list