0
可能重複:
Create Subdomains on the fly with .htaccess (PHP)如何使用.htaccess創建動態子域?
我想有以下的域結構的.htaccess:
domain.com REWRITES TO Home Page (index.php)
www.domain.com REWRITES TO Home Page (index.php)
blog.domain.com REWRITES TO index.php?page=blog
*.domain.com REWRITES TO index.php?page=user&id=* (where * can be anything)
有沒有一種方法來創建這樣的事?
退房哪些主機[此鏈接。(http://stackoverflow.com/questions/586129/ create-subdomains-on-the-fly-with-htaccess-php)這是另一個像你的問題,有一個很好的答案。 – phpisuber01