I think I’ve found the solution for this;
Please read the whole thing to find the remedy.
If you are a process oriented developer you may be hosting few magento installations to make the life easier for the developers, testers and the alpha/beta clients till you roll out the magento based application as a live site.
If that is the case, our traditional approach would be maintaining three or four installations similar to the following;
http://www.website.com - live = at the web site root
staging.website.com - staging or the alpha/beta site = folder location would be root/staging
qa.website.com - for the testers and the data entry ppl to test the application, changes and the theme = folder location would be root/qa
dev.website.com - for the developers to continue with the design changes, themes and the modification = folder location would be root/dev
If you are coming from a wordpress or similar CMS background, then the normal practice would be opening these sites on different tabs and performing your duties in one or another.
This is the common practice when dealing with the configs inside the admin panel.
This is where the exact problem generates. Lets say you have open two admin panels from the same machine or different machines sharing a single gateway, suddenly one session expires due to your inactivity on the same but still have the connection with other.
Browser tries to connect using the existing session and start the re-direction.
98% of the time it changes the core-config-data table against the inactive session holder and change the base URL (this is something we have to dig and in to detail and see)
In order to fix the re-direction, first you have to change the base URL values inside the core-config-data tables and then clear the session and cache details founds inside the installation/var folder
Upon completion, you can start loading the URLs without any re-direction
It seems Magento community is yet to explore these issues else full of incompetent so called geeks. Not a blame to anybody but these details should be made available inside the magento FAQs.