0
如果指向http://domain.com它重定向到http://www.domain.com/thesite/index.asp這是實際的位置。無論頁面,它總是附加實際的文件夾路徑。Canonical重定向與傳統的ASP顯示網站文件夾
我一直在使用此腳本進行規範重定向,包含在每個頁面中。
If InStr(Request.ServerVariables("SERVER_NAME"),"www") = 0 Then
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www." &_
Request.ServerVariables("HTTP_HOST")&_
Request.ServerVariables("SCRIPT_NAME")
End if
我有一個共享主機的幾個網站,每個網站在自己的文件夾中。
我該如何預防?
thanx您的幫助