<html><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000">from
<a class="moz-txt-link-freetext" href="https://stackoverflow.com/questions/15597174/varnish-redirection">https://stackoverflow.com/questions/15597174/varnish-redirection</a><br>
<br>
<div class="post-text" itemprop="text" style="margin: 0px 0px 5px;
padding: 0px; border: 0px; font-size: 15px; width: 660px; word-wrap:
break-word; line-height: 1.3; color: rgb(34, 36, 38); font-family:
Arial, 'Helvetica Neue', Helvetica, sans-serif; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
orphans: auto; text-align: left; text-indent: 0px; text-transform: none;
white-space: normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"><p
style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size: 15px;
clear: both;">In vcl_recv:</p><pre style="margin: 0px 0px 1em; padding: 5px; border: 0px; font-size: 13px; overflow: auto; width: auto; max-height: 600px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; word-wrap: normal; background-color: rgb(238, 238, 238);"><code style="margin: 0px; padding: 0px; border: 0px; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit; background-color: rgb(238, 238, 238);">set req.http.x-Redir-Url = <a class="moz-txt-link-rfc2396E" href="http://newdomain.com">"http://newdomain.com"</a> + req.url;
error 750 req.http.x-Redir-Url;
</code></pre><p style="margin: 0px 0px 1em; padding: 0px; border: 0px;
font-size: 15px; clear: both;">In vcl_error:</p><pre style="margin: 0px 0px 1em; padding: 5px; border: 0px; font-size: 13px; overflow: auto; width: auto; max-height: 600px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; word-wrap: normal; background-color: rgb(238, 238, 238);"><code style="margin: 0px; padding: 0px; border: 0px; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit; background-color: rgb(238, 238, 238);">if (obj.status == 750) {
set obj.http.Location = obj.response;
set obj.status = 301;
return(deliver);
}
</code></pre></div>
<br class="Apple-interchange-newline">
<br>
<br>
<div class="moz-signature">-- <br>
<div>Sent from <a
href="https://www.postbox-inc.com/?utm_source=email&utm_medium=siglink&utm_campaign=reach"><span
style="color: rgb(51, 102, 153);">Postbox</span></a></div></div>
<br>
<br>
<span><a class="moz-txt-link-abbreviated" href="mailto:georgi.int@gmail.com">georgi.int@gmail.com</a> wrote:</span><br>
<blockquote cite="mid:56D30E80.5010003@gmail.com" type="cite">Thank you
about your reply. I am using varnish 3 and tried the following
configuration:
<br>
<br>
if (req.http.host ~ "thedomain\.com" && req.url~ "^<i
class="moz-txt-slash"><span class="moz-txt-tag">/</span>disclib/download<span
class="moz-txt-tag">/</span></i>")
{ set req.backend = filedownload; set req.http.connection = "close";
return (pipe); }
<br>
<br>
as I defined befor the backend filedownload, but the result is service
unavailable.
<br>
<br>
Any other suggestions?
</blockquote>
<br>
</body></html>