I had my own experience of 301 permanently redirecting a domain to another (every page mapped) and Google properly worked everything out and it never had any problem SEO-wise. However, what if I'm redirecting a whole domain to the sub-directory of another domain in the same manner?
For instance, http://www.example.com/
301 to http://www.another.com/example/
.
And everything underneath is correctly mapped such that example.com/something/somepage.php?a=1
is 301 permanently redirected to another.com/example/something/somepage.php?a=1
.
Etc.
Does anyone have any experience in this situation? Would it all work out good with regards to SEO?