Redirect site with . htaccess

Asked

Viewed 118 times

0

Good Afternoon!

I want to make a redirect on my website and am not finding the solution.

I want when the guy accesses by ip for example: https://1.2.3.4 he directs to https://site name

It is possible with . htaccess?

Remembering that it is only internal.

Thank you

  • Possible Duplicate --> http://answall.com/questions/64878/obten-querystring-e-redirecionar-com-htaccess

  • It’s not, there talks about name->name I need ip->name

1 answer

0

You can try something like this:

    RewriteEngine on
    RewriteCond %{REMOTE_ADDR} 127\.0\.0\.1
    RewriteRule $ /outrapagina.html [R=302,L]
  • Ref.: http://www.netshinesoftware.com/blog/restricting-access-to-a-url-by-ip-address-using-mod-rewrite/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.