I am trying to use redirect links using HTACCESS for http and https.
This is my HTACCESS code:
RewriteRule ^go/(https:\/*)*(.+)$ https://$2 [L,R=301]
RewriteRule ^go/(http:\/*)*(.+)$ http://$2 [L,R=301]
When I'm using https links it works fine:
http://mywebsite.com/go/https://facebook.com
leads to https://facebook.com
But for some reason when I use http it reads it like https and this is what happens:
http://website.com/go/http://facebook.com leads to https://http/facebook.com
What am I doing wrong?
Thanks in Advance! :)
Not really sure why you would want to link to external sites as fake links on your own, but ok..
you could probably condense those to 1 rule like: