Hopefully somebody can help me
I have 2 domain names registered, domain1 and domain2.
Domain2 points to domain1 which is a DNN site
I would like to detect if somebody has got to domain1 using domain2 url then redirect them to a subweb within domain1
I have tried editing Default.aspx and adding the following;
<%
'Use the request serverVariables to get the address they typed in their browser
if Request.ServerVariables("SERVER_NAME") = "www.domain2.co.uk" then
Response.Redirect("domain2/default.aspx")
end if
%>
This doesn't give an error but also doesn't redirect.
I have used it on another site without any problem
Also, if i try going directly to the subweb www.domain1.co.uk/domain2/Default.aspx it doesn't load, it goes to the default page of domain1, so i think it is something to do with DNN
Hope this all makes sense and somebody can point me in the right direction?
Thanks
Colin