using regex in URI Routes in CodeIgniter
<p>Well I've been enjoying CodeIgniter for a few years now but I still haven't got the hang of using regexp in my URI routing in routes.php</p>

<p>I am trying to route all requests for URI's that contain another URL.</p>

<p>For example:</p>

<pre><code>http://mywebsite.com/http://www.google.com
http://mywebsite.com/www.google.com
http://mywebsite.com/google.com
</code></pre>

<p>the $_SERVER['REQUEST_URI'] is like:
/<a href="http://www.google.com" rel="nofollow noreferrer">http://www.google.com</a></p>

<p>I was using:
$route['^(http.<em>|www.</em>)']
but this doesn't catch the 3rd example</p>

<p>I'm wondering if I should either use one of those very long regexp's that look for a valid url and allow for the proceeding forward slash.</p>

<p>Another idea was to look for a period ('.'), But I didnt want <a href="http://example.com/file.txt" rel="nofollow noreferrer">http://example.com/file.txt</a> to match.</p>

<p>If anyone could help with this expression I really would be very grateful. I've been losing sleep on this one!</p>