Change access url as ip on htacess

1

I have a system that is all set with the address fixed in the code, for example: 'site.producao.com.br', and is in ip 10.109.104.27, however the development server is in link on ip 10.108.105.59.

Is there a way in htacess to make if ip is dev (.59) it points to url 'site.dev'? Without having to change the whole code?

Thank you!

    
asked by anonymous 13.07.2015 / 15:47

1 answer

1

Try.

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REMOTE_ADDR} ^10.108.105.59
RewriteRule ^.*$  http://site.dev [L]
    
14.07.2015 / 16:39