How to Redirect to a web page that is different than your domain?

Discussion in 'General troubleshooting' started by karen lin, Mar 24, 2014.

  1. Hi
    I just bought a year of service with Winhost. The domain I used is the one I purchased from GoDaddy.

    How do I set up redirect ? In other words, let' say this is my domain that Winhost is using
    www.mydomain1.com

    I want to be able to re-direct visitors to another page
    www.anotherdomain/page1

    Is it possible to set that up in Winhost? If so, how do I do that? Please advise.

    Thanks
     
    Last edited by a moderator: Oct 14, 2015
  2. ComputerMan and Michael like this.
  3. Hi
    I have created the script, named it default.asp and FTP it to the root of my folder. I deleted the WinhostingDefault.htm, but when I go to my domain, karen4trustee.com, it is still displaying the old WinhostingDefault.htm. What am I doing wrong? Please advise. Many thanks

    <%
    If InStr(Request.ServerVariables("karen4trustee.com"),"www") = 0 Then
    Response.Status="301 Moved Permanently"
    Response.AddHeader "Location","http://www."
    & Request.ServerVariables("HTTP_HOST")
    & Request.ServerVariables("REQUEST_URI")
    Response.End
    Response.Redirect("myNewURL")
    End if
    %>
     
    Last edited by a moderator: Oct 14, 2015
  4. ComputerMan

    ComputerMan Winhost Staff

    I think you wrote in on a ticket regarding this issue. I remember it from yesterday and I believe the problem was due to the web browser caching your old web site.

    I believe I told you to remove our default document via FTP and clear your web browser cache. Then refresh the web browser to load your real default document.
     
  5. Hi
    I made the change to my code, and i cleaned cache and refreshed. This is my code

    <%
    If InStr(Request.ServerVariables("server_name"),"karen4trustee.com") = 0 Then
    Response.Status="301 Moved Permanently"
    Response.AddHeader "Location","http://www.wix.com"
    Request.ServerVariables("HTTP_HOST")
    Request.ServerVariables("REQUEST_URI")
    Response.End
    Response.Redirect("http://doglin9.wix.com/electkaren")
    End if
    %>

    Please help
     
  6. Actually Never Mind, I got it working
     

Share This Page