HELP!! SUBDOMAIN REDIRECTS IN ASP: How do I maintain specific URL?

Discussion in 'ASP.NET / ASP.NET Core' started by BobbyKnorr, Jun 23, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Ive recently converted my html site to aspx andI am trying to maintain the same sub domain URLs to keep page rank. It is required that the following be added to your default aspx page to properly direct to the right subdomain. However, when "subdomain1.domain.com" is requested, the finished URL adds the subdirectory folder to the finished URL:
    ex.
    REQUESTED / Desired URL = subdomain1.domain.com --> FINISHED URL= subdomain1.domain.com/subdomain1/

    This is an undesired result, especially when you are trying to maintain specific URL for page rank.
    How can this be avoided?Any solutions would be greatly appreciated.

    (Example ASP script for subdomain redirect.)
    <% If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("subdomain1.domain.com") ) > 0 Then
    Response.Redirect("/subdomain1")
    ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("subdomain2.domain.com") ) > 0 Then
    Response.Redirect("/subdomain2")
    ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("subdomain3.domain.com") ) > 0 Then
    Response.Redirect("/subdomain3")

    %>

    Do any URL rewrites exist for ASP.NET?


    Post Edited (B Knorr) : 6/23/2005 11:39:31 PM GMT
     
  2. Bruce

    Bruce DiscountASP.NET Staff

  3. Bruce,


    Thanks for the link, however, that will not solve the problem for subdomains. I had to change the A record IP to point to another hosting account I have.


    Why was this not a solution from discountasp?


    Mike



    Post Edited (B Knorr) : 6/30/2005 4:38:44 PM GMT
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page