changing static link to relative link

If I’m understanding your question correctly, you want links on your site to dynamically change depending on the domain name of the environment you’re in?

To do this you can replace any hard coded links with the home_url() function.

So you would change references to links from http://192.168.0.1/your/path/here
to <?php home_url(/your/path/here); ?>

If your links were defined through the WordPress Admin UI then you’ll need to use filters or change all the links via an option in Settings. Refer to this question for details: https://stackoverflow.com/questions/22014167/general-wordpress-link-filter