hn4u @ Last updated 21/11/04 22:42
Go to my homepage at http://4u.jcisio.com
Full version available at http://4u.jcisio.com/r/article602.htm

Không rõ

Nhiều domain, một site

Câu trả lời là sử dụng một đoạn code chúng ta có thể xác định tên domain được đánh trên browser và redirect sử dụng CASE

Mã lệnh (ASP)
<%
host=lcase(request.servervariables("HTTP_HOST"))
SELECT CASE host
CASE "www.designbliss.com.au"
   response.redirect "au/"
CASE "designbliss.com.au"
   response.redirect "au/"
CASE "www.website-design-australia.com"
   response.redirect "wda/"
CASE "website-design-australia.com"
   response.redirect "wda/"
CASE ELSE
   response.redirect "front.asp"
END SELECT
%>


hainam4u @ Last updated 21/11/04 22:42
Go to my homepage at http://4u.jcisio.com