I hosted my website with discountASP.NET with my domain name: http://www.a1open.com, but I want to use my login page to run with security meaning that switching from HTTP to HTTPS as following: When user type http://login.a1open.com/ then switching to https://login.a1open.com/ How do I code with ASP.NET 2.0 and how is the script of subdomain of http://www.a1open.com/login/ Please help me to solve this problem. Sisovin
You can actually look a this KB article that shows you how to redirect domains: http://support.discountasp.net/KB/a369/how-to-redirect-a-subdomain-to-a-subdirectory.aspx You can also use that KB article to switch from HTTP to HTTPS, so it would work out nicely for you.
VBScript to redirect subdomain As your link: http://support.discountasp.net/KB/a369/how-to-redirect-a-subdomain-to-a-subdirectory.aspx in VBScript, I save file "subdomain.vbs", then I log-in via my ftp account with your company and copy my subdomain.vbs to paste into the rootdirectory. for example: in the subdomain.vbs, I wrote code as below <% If InStr( UCase(Request.ServerVariables("NS1.DISCOUNTASP.NET")), UCase("about.a1open.com") ) > 0 Then Response.Redirect("/a1about") %> But, I do not know what is your "server_name". Please help me with your kind support. Chieng Sisovin
Chieng, you do NOT replace "SERVER_NAME", it is name fo the server variable. BTW, you need to say the file as .asp extension rather than vbs.
Coding script on the default document with the .aspx extension In the default page of default.aspx, I write vbscript to redirect my subdomain to subdirectory as follows: <script type="text/vbscript"> Dim sname, sPath sname = Request.ServerVariables("SERVER_NAME") sname = ucase(sname) sPath = Request.ServerVariables("PATH_INFO") if InStr(sname,"about.a1open.com") <> 0 then response.redirect "/about" & sPath elseif InStr(sname,"admin.about.a1open.com") <> 0 then response.redirect "/a1about/administrator" & sPath elseif InStr(sname,"admin.amazon.a1open.com")<>0 then response.redirect "/a1amazon-shop/administrator" & sPath elseif InStr(sname,"contact.a1open.com")<>0 then response.redirect "/contact" & sPath else response.redirect "default.aspx" end if </script> But I don't see it work as I type URL like http://about.a1open.com/ then Enter its result is show up the default page, it does not show up the default of the about page. I think because my redirect suddomain to subdirectory that's why I cannot use my SSL Certicate. I want to know that what limitation I use on SSL. For example, I want my web client login to his personal account, but when they login I code to redirect their account as on simple URL http://login.a1open.com -> https://login.a1open.com/a1logon/ Normally, I can use only https://a1open.com/a1administrator. Do I need to request your discountasp.net team to setup on other URL if I want such as my switch of URL http://login.a1open.com/a1logon -> https://login.a1open.com/a1logon/ Thank you for your supports, Chieng Sisovin