二級域名設置說明
就是在申請的域名前以 * 通用字元來表示,即不管你輸入 test.mydomain.com 或 test1.mydomain.com 都可以指到 mydomain.com 的 ip ,
再利用 apache 的 mod_rewrite 做轉址,至於如何轉址,還在研究
2007/04/09補充
 編修 /etc/httpd/conf/httpd.conf 增加下面
 目的將網址開頭不是 www 或 ftp 開頭一律轉址為 ~user
 例:user.shyong.com.tw => shyong.com.tw/~user
 <VirtualHost *:80>
      ServerAdmin root@shyong.com.tw
      DocumentRoot /var/www/html
      ServerName shyong.com.tw
      ServerAlias linux.shyong.com.tw *.shyong.com.tw
      <Directory /var/www/html>
            AllowOverride None
            Order deny,allow
            #AddDefaultCharset UTF8
      </Directory>
      <IfModule mod_rewrite.c>
          RewriteEngine on
          RewriteCond %{HTTP_HOST}  !^w{1,3}.shyong.com.tw$ [NC]
          RewriteCond %{HTTP_HOST}  !^ftp.shyong.com.tw$ [NC]
          RewriteCond %{HTTP_HOST}  ^[^.]+.shyong.com.tw$ [NC]
          RewriteRule ^(.+)     %{HTTP_HOST}$1  [C]
          RewriteRule ^([^.]+).shyong.com.tw(.*)$ http://shyong.com.tw/~$1$2%{QUERY_STRING}      [L]
      </IfModule>
 </VirtualHost>
  
迴響
二級域名設置說明 | 豬窩
My relatives always say that I am wasting my time here at net, but I know I
am getting knowledge all the time by reading thes good articles or reviews.
二級域名設置說明 | 豬窩
We're a bunch of volunteers and opening a new scheme in our community.
Your website provided us with valuable information to work on. You have performed a formidable process and our entire
community will probably be grateful to you.
二級域名設置說明 | 豬窩
My family all the time say that I am wasting my time here at net, except I know
I am getting knowledge everyday by reading thes nice
content.
二級域名設置說明 | 豬窩
Aw, this was an extremely good post. Taking the time and actual effort to generate
a superb article… but what can I say… I hesitate a
whole lot and never manage to get nearly anything done.
二級域名設置說明 | 豬窩
Hi, every time i used to check webpage posts here early in the dawn,
for the reason that i love to gain knowledge of more and more.