tags:

views:

50

answers:

2

I have a site running on a subdomain of new.site.com and I want to be able to just put something in the .htaccess file that will display the subdomain's content as if it was in the root.

Where the site is: new.site.com The url that I want to use: site.com

Basically what I want to do is just not move the files from the subdomain to the root of my server.

A: 

Try using a domain pointer.

EDIT: Not sure why my answer was downed. Let me elaborate a little more.

I do this myself on my websites. In my hosting company's control panel, I have the option to create domain pointers. What this does is set a domain to use the website of another domain.

jchapa
I didn't down it but I'm not sure how to do that in cPanel. All I have the option to do is create redirects.
Chad
Can you create addon domains? I believe that's how cPanel does it. (I just logged into one of mine).
jchapa
It gave me an error saying that I can't park my main domain. Do I have to remove the 301 redirect first?
Chad
Okay, I see the problem now. I had the two flipped. I thought you were trying to point your sub-domain to your root. I'm so sorry about that. I can't find any way to do what you're talking about. I think the best way would be to move the files. Really easy in FileZilla, though, unless you have DB pointers that are domain specific. :-)If you still need to keep the subdomain intact, though, you could create a pointer like we talked about.
jchapa
A: 

Actually found this that works incase anyone was wondering:

RewriteEngine on
RewriteBase /
RewriteRule ^$ /subdomain/ [L]
Chad