二級域名設置說明
就是在申請的域名前以 * 通用字元來表示,即不管你輸入 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>
迴響
二級域名設置說明 | 豬窩
magnificent points altogether, you simply
won a new reader. What would you recommend in regards to your post that you made a few days in the
past? Any positive?
二級域名設置說明 | 豬窩
If you want something changed, cropped differently, or in in any manner altered, you might have
someone that is going to do this in your case (in many cases included at
no extra cost). It's not how much information could you cram to your head at
once but, simply how much information you can actually retain that creates one
to learn faster and more efficiently. These tattoos may give the
wow factor when joined which has a sexy couple of high heel shoes.
二級域名設置說明 | 豬窩
Hi, i read your blog occasionally and i own a similar one and i was just curious if you get a lot of spam remarks?
If so how do you stop it, any plugin or anything you can recommend?
I get so much lately it's driving me insane so any assistance is very much appreciated.
二級域名設置說明 | 豬窩
Excellent blog here! Also your site so much up fast! What web host are
you the use of? Can I am getting your associate hyperlink for your host?
I want my web site loaded up as fast as yours lol
二級域名設置說明 | 豬窩
We stumbled over here from a different web page and thought I should check
things out. I like what I see so now i'm following you.
Look forward to going over your web page for a second time.