【Windows進階主機】子網域轉址方式



請使用檔名為 index.asp 或是 default.asp (index.aspx不支援),同時刪除 index.htm 及 index.html這兩個檔案。

在 index.asp 檔案內容的最上面,用記事本加上

<%

if (instr(request.ServerVariables("HTTP_HOST"), "sub")>0) then response.redirect "sub/index.asp"

 %>

網頁: www.url.com.tw

子網域:sub.url.com.tw

將此檔案上傳至網頁空間www目錄下,並新增一個與子網域同名的資料夾(當然這個資料夾裡也要有網頁檔案)。