<a href="www.example.com">example</a> redirects to mysite.com/www.example.com? : <p>Example:  </p>

<pre><code>&lt;a href="www.example.com"&gt; Click here to go to www.example.com!&lt;/a&gt;
</code></pre>

<p>and</p>

<pre><code>&lt;a href="http://www.example.com"&gt; Click here to go to www.example.com!&lt;/a&gt;
</code></pre>

<p>The first one redirects to the following URL: <code>http://www.currentsite.com/www.example.com</code>
while the second one works perfectly fine.</p>

<p>here's the code I'm using: (ruby on rails)</p>

<pre><code>&lt;%=h link_to @user.details.website, @user.details.website, :class =&gt; 'link'%&gt;
</code></pre>

<p>The only solution I have would be checking for <code>http://</code> and add it if it's not already there.</p>
