View Single Post
  #1   IP: 117.95.53.152
Old 2009-05-16, 11:31 AM
topvip topvip is offline
超级版主
 
Join Date: 2006-01-04
Posts: 1206
topvip 正向着好的方向发展
Default 一个空间绑多域名,.htaccess方法

Can I host multiple domains on one account?

Yes, using our Domain Alias service.

A Domain Alias allows additional domain names to all lead to same account. There are several ways you can use this service:


Multiple Domains, One Website

For example, if you are hosting your domain name "original.com" with us and added a Domain Alias for "alias.com", then http://www.original.com and http://www.alias.com would take a visitor to the exact same pages of your original.com website. http://original.com/somefile.html would bring someone to the exact same page as http://alias.com/somefile.html.



Multiple Domains, Multiple Websites

Using this method, you can host an additional website within your account for each Domain Alias you add. This is a custom configuration requiring a couple extra steps.

After adding the Domain Alias in OnSite, then place an .htaccess file in /htdocs/www of the following example format:


Code:
  RewriteEngine On
  RewriteCond %{HTTP_HOST}  alias.com$ [NC]
  RewriteCond %{REQUEST_URI} !^/alias/.*$
  RewriteRule ^(.*)$  /alias/$1
Then, upload your HTML files original.com to /htdocs/www/ and your HTML files for alias.com to /htdocs/www/alias
Reply With Quote