Any solution to use two different $base_url's for drupal 7 Any solution to use two different $base_url's for drupal 7. What i need to do is when i log to my site using IP/VPN, $base_url should be xxxx.xxxx.xxxx.xxxx and without any vpn connections $base_url should be aaaa.aaaa.aaaa.aaa. Any solutions? I'm Using Drupal 7.54
Rather than trying to change the base_url manually you might be better using something like https://www.drupal.org/project/domain or Drupal's language translation system and having 2 domains setup and the content shared for both domains.

So they effectively will look and act the same but the base url for drupal will be whatever the user is currently on. Then you could use these modules inbuilt hooks if you wanted to force a user ontop a specific domain based on their IP or whatever