FastDomain修改Primary Domain

| No Comments | No TrackBacks
几年前的春节值班,无聊之下在now.cn注册了guduo.net,而后好久才又到FastDomain成功注册和购买主机空间,再后来就是把guduo.net迁移到FastDomain。

一直以来,Primary Domain都是yimutian.net,guduo.net是作为Addon Domain来管理。但几年下来,都是使用的guduo.net的域名,yimutian.net的域名没有使用,暂时也没有继续使用的计划,所以也就想把guduo.net作为Primary Domain进行管理了。

通过查询FastDomain的帮助文档,很方便的找到了相关信息:
How to change the Primary Domain

https://my.fastdomain.com/cgi/help/345

What to do before renaming your account

  1. The rename Process normally takes from 20 minutes to 5 hours, depending on the size of the account.

  2. The domain you are changing to must be associated with the account first.

  3. The current main domain can never become the main domain again.

  4. The current account's username, password, files, databases and e-mails will remain unchanged.

  5. The new primary domain will point to the public_html directory itself, the same way the main domain does currently.

  6. The website files may need to be moved into the public_html directory and out of the public_html directory, to correspond with the new primary domain and assignment of the old primary domain to a subfolder. 
    Please note that this will be your responsibility to do, and may cause some site files, scripts or other applications to break, requiring modification to work with the new site location.

  7. Custom DNS entries will be deleted for both domains involved in this change and will need to be recreated after the rename is complete.

  8. If you have an SSL certificate, please note it will only work for the main domain; if the SSL was purchased through our cPanel, it will automatically be revoked for the original domain, and re-assigned to the new primary domain. 
    Note: This most often will only take a few minutes, but could take up to a few hours.

  9. Although renaming an account should not move or delete any files on the account, we do recommend creating/downloading a backup of all files and databases prior to requesting the rename. Please Click Here for information about creating and downloading backups.

  10. The new primary domain must be registered to you. If needed, you may register new domains for $13.99 each, per year, via the Domain Manager in the cPanel.

修改之后呢,之前用子目录管理的guduo.net没法访问了,再找资料:
How to host the Primary Domain from a subfolder (.htaccess)
https://my.fastdomain.com/cgi/help/347

You will want to insert the following code block and make modifications as noted in the (#) comments. You will need to change the two instances of example.com to your domain, and the three instances of subdirectory to the folder where you want your site.

# FastDomain.com
# .htaccess main domain to subdirectory redirect
# Copy and paste the following code into the .htaccess file
# in the public_html folder of your hosting account
# make the changes to the file according to the instructions.
# Do not change this line.
RewriteEngine on
# Change example.com to be your main domain.
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
# Change 'subdirectory' to be the directory you will use for your main domain.
RewriteCond %{REQUEST_URI} !^/subdirectory/
# Don't change these line.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Change 'subdirectory' to be the directory you will use for your main domain.
RewriteRule ^(.*)$ /subdirectory/$1
# Change example.com to be your main domain again.
# Change 'subdirectory' to be the directory you will use for your main domain
# followed by / then the main file for your site, index.php, index.html, etc.
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteRule ^(/)?$ subdirectory/index.html [L]

Visitors to your Web site will not be able to tell that your main domain is using a subdirectory, they will still see the Web site address as http://www.example.com/page.html.

Note: This will not work with some website software. You will also need to modify the $base_url$live_site or other configuration settings in those to finish the process.


原来是通过.htaccess来做Rewrite

后面的事情,那就是重新好好维护这个域名和空间了。

最近一直有弄一个VPS的冲动,忍住!

http://www.ramhost.us/?page=virtual-dedicated-server

--EOF--

No TrackBacks

TrackBack URL: http://www.guduo.net/cgi-bin/mt/mt-tb.cgi/394

Leave a comment

Pages

May 2016

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

About this Entry

This page contains a single entry by 谷多 published on December 17, 2012 10:06 PM.

R1 的transmission版本问题 was the previous entry in this blog.

物尽其用:让iPhone通过ssh上网 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.