开发者

Display content as root from subdomain

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 w开发者_开发百科ant to do is just not move the files from the subdomain to the root of my server.


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.


Actually found this that works incase anyone was wondering:

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜