I have a.com hosted @ dreamhost. Recently I have registered a new domain b.com.
I want b.com to show staff from a.com/c/ directory.
I have point the web directory of b.com to a.com/c/ from web panel, but it doesn’t seem to be working.
Have I done something wrong? What should I do to make it right?
A remap is usually the right approach, though I don’t think it works for a root directory, like b.com. http://wiki.dreamhost.com/KB_/Account_Control_Panel/Domains::_Remap_Sub-Dir
The only other thing I can think of is a symbolic link:
cd ~ (change to home directory)
mv b.com b.com.old (move the old domain out of the way)
ln -s a.com/c b.com (replace the old domain with a “mirror” of the c directory: the link will hopefully work)
Create a .htaccess file in b.com
redirect 301 / http://a.com/c/
Maximum Cash Discount on any plan with MAXCASH
How To Install PHP.INI / ionCube on DreamHost
Thanks a lot ppl.
I will give a try and report back.
I have tired to use the .htaccess file, it works however, the url in address bar won’t stay at b.com.
What can I do to avoid showing a.com/c in address bar?
Why don’t you just copy the contents of a.com/c/ into b.com directory ?
I followed your instructions, created a link under root directory, it didn’t work.
Thanks for helping, any other ideas?
That actually worked for me. At least for static pages. PHP sites are often smart enough to redirect to where it really resides. What happened when you tried the linked site?
I have concern about my google ranking ~
I guess there’s no other way, I have to just copy everything to the new directory.
It showed an “Index of…” page
even though there is only a symbolic link to the a.com/c in roo directory, no actual directory of b.com
I gave it another try, this time it showed the a.com instead.
To retain your current a.com/c/ Google ranking, use a .htaccess file in your a.com directory.
redirect 301 /c/ http://b.com/
OK I think I will settle with moving the whole directory.