<p>I've had some success using Rack middleware for that sort of thing on Heroku, although I can't remember specifically which one right not.</p>
<p>On 3 Aug 2010 13:19, "Anthony Green" <<a href="mailto:Anthony.Green@bbc.co.uk">Anthony.Green@bbc.co.uk</a>> wrote:<br type="attribution">> <br>> Can any heroku users know what the answer is ?<br>
> <br>> <br>> ------ Forwarded Message<br>> From: Michael Smethurst <<br>> Subject: Redirects on heroku<br>> <br>> Hiya<br>> <br>> Just following on from lunchtime chat...<br>> <br>> I've managed to get cctvspotr running on heroku and set it up with 2 custom<br>
> domains: <a href="http://www.cctvspotr.org">www.cctvspotr.org</a> and <a href="http://cctvspotr.org">cctvspotr.org</a><br>> <br>> I've registered <a href="http://www.cctvspotr.org">www.cctvspotr.org</a> and pointed it at heroku's dns. All fine<br>
> <br>> <a href="http://www.cctvspotr.org">http://www.cctvspotr.org</a><br>> <a href="http://cctvspotr.org">http://cctvspotr.org</a><br>> <br>> Now I'd like to get <a href="http://cctvspotr.org">cctvspotr.org</a>{/whatever} to 301 to<br>
> <a href="http://www.cctvspotr.org">www.cctvspotr.org</a>{/whatever}. But can't find any helpful hints. The nearest<br>> I found was:<br>> <br>> <a href="http://docs.heroku.com/custom-domains#redirecting-traffic-to-specific-domain">http://docs.heroku.com/custom-domains#redirecting-traffic-to-specific-domain</a><br>
> <br>> I tried adding that code to my application controller with TheDomain =<br>> '<a href="http://www.cctvspotr.org">www.cctvspotr.org</a>' but that just redirected <a href="http://cctvspotr.org">cctvspotr.org</a> to<br>
> <a href="http://cctvspotr.orgwww.cctvspotr.org">cctvspotr.orgwww.cctvspotr.org</a><br>> <br>> Am sure there's a proper forum to ask this on somewhere but not sure where<br>> <br>> Any help much appreciated<br>
> <br>> Cheers<br>> michael<br>> <br>> ------ End of Forwarded Message<br>> <br>> <br>> <a href="http://www.bbc.co.uk/">http://www.bbc.co.uk/</a><br>> This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.<br>
> If you have received it in error, please delete it from your system.<br>> Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.<br>> Please note that the BBC monitors e-mails sent or received.<br>
> Further communication will signify your consent to this.<br>> <br>> _______________________________________________<br>> Chat mailing list<br>> <a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
> <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br></p>