Hey Guys. I’m having the same problem, some combination of those solutions does work, but they are dubious. I think the root cause is something more complex.
What do I mean:
Setting the redirect to base - this is for redirecting a site like coolsite.com to www.coolsite.com so that your external links and SEO come up right. Using it for these other things is hiding the real issue.
Adding the store code to the url - this is really for debugging purposes. It’s useful when you have multiple stores that look the same, but act a little different. Using it for url rewriting problems is not really the goal.
chmod 777 on every file - Ugh. Security hole. Enough said.
Making files other than session and cache writable—security hole
Dumping the entire magento core into the root of your website - This is a violation of the S in the SOLID principles. (Violation of “separation of concerns")
All of the above might work, but it’s not elegant or clean or really “correct” in the sense that it upholds good practices of programming or system administration.
I hope that the Magento team or some keen plugin-providers will find a way to help us better diagnose our problems before we resort to these work-arounds. One example is a self-diagnotic script that analyzes folder permissions and tells us what should be what. Wordpress does this via plugins for instance.
Anyhow, I got here because I have this problem myself (/admin redirecting to root url) and I was looking for a solution.