How to redirect url with htaccess out of domain?

0

I have a www.dominio.com.br domain.

On a given page, I need to put a link to google + from the client. I'm using:

a href="www.google.com" target="_blank"

For tests, and what is happening is that instead of the system opening a new tab with the address www.google.com it is trying to redirect into my domain ( www.dominio.com.br/www.google.com )

Does anyone know how I can resolve this?

    
asked by anonymous 20.07.2015 / 16:21

4 answers

1

Just modify your property href to href="http://www.google.com"

    
20.07.2015 / 16:36
0

My friend, are you going to direct only one page? Would not it be simpler to use a redirection via PHP, for example?

<?php header("Location: http://www.site_a_ser_redirecionado.com"); ?>
    
20.07.2015 / 16:29
0

Hi, try this:

RewriteEngine On
RewriteBase /
RewriteRule ^/?$ http\:\/\/plus\.google\.com\/+Coca-Cola\/

Note: Trap the URL by always escaping with a backslash (\) the ":", ".", "/"

    
20.07.2015 / 16:32
0

You do not need to use any server-side language for this, just add the protocol http or https before:

<a href="http://www.google.com" target="_blank">

SSL authentication error often occurs because it does not use the correct protocol, so you can omit the protocol and only add // , leaving the server to redirect to the correct protocol:

<a href="//www.google.com" target="_blank">
    
20.07.2015 / 16:39