I'm trying to create a rewrite rule that will do the following:
http://www.example.com/http://other.example.com
→ http://www.example.com/index.php?var=http://google.com
This is my current rule:
RewriteCond %{REQUEST_URI} ^/(http[s]?\:\/\/|ftp\:\/\/)?(www\.)?[a-zA-Z0-9-\.]+\.(com|org|net|mil|edu|ca|co.uk|com.au|gov|ws|info)$
RewriteRule ^(.*)$ http://www.example.com/index.php?var=$1 [R]
Which produces:
http://www.example.com/http://google.com
→
http://www.example.com/index.php?var=
http:/google.com
No matter what I try, I'm always getting http:/
out, instead of http://
. Any ideas?