Redirect subdomain between hosted sites

Last post 01-08-2008 10:34 PM by Thomas Sun – MSFT. 3 replies.

Sort Posts:

  • Redirect subdomain between hosted sites

    01-06-2008, 4:21 PM
    • Loading...
    • chrismr
    • Joined on 07-24-2007, 11:19 PM
    • Posts 6

    Hello

    I have my app on a hosted Windows server, and the associated blog on an Apache server.  Both are hosted by GoDaddy.  The blog is located at http://www.MySite.com/WebApp/blog .  The web app is located at http://www.WebApp.com with the subdomain http://blog.WebApp.com .

    My issue has been that when I try to redirect http://blog.MyWebApp.com to http://www.MySite.com/companyname/blog I get an HTTP 500 Internal Server Error when I use the code below in default.asp:

    <%
    Response.Status="301 Moved Permanently" Response.AddHeader "Location", "http://www.MySite.com/WebApp/blog/index.php"
    %>

    I've had no luck finding a resource to help me figure this out.  I don't have access to IIS due to the hosting, and I want the redirect to be seamless -- I don't want the 'real' URL displayed because we may be changing to a ASP-based blog at a later date.

     Thanks for any help or guidance.

    Filed under: , , ,
  • Re: Redirect subdomain between hosted sites

    01-06-2008, 11:29 PM
    Answer
    • Loading...
    • shadowcodes
    • Joined on 08-01-2006, 6:26 PM
    • Sri lanka
    • Posts 81

    well since your app is on windows server create a subfolder  in ur app folder as blog, which normally subfolders within the main directory can be regarded as sub domains. within this folder create a default.aspx page , and in the form load even of that page type response.redirect(your real blog address)... thats all 

    http://www.Aneef.net
  • Re: Redirect subdomain between hosted sites

    01-07-2008, 8:33 AM
    • Loading...
    • chrismr
    • Joined on 07-24-2007, 11:19 PM
    • Posts 6

    Thank you for the reply, my apologies upfront for not following you.

    When you say "...create a subfolder in ur app folder as blog,..." I think I've already done that on the web server, http://blog.WebApp.com is that subdomain.  And in that subdomain is the code I listed above, which was supplied to me by GoDaddy but throws an error.

    Could you show me a code example of what you mean?

     Thank You

  • Re: Redirect subdomain between hosted sites

    01-08-2008, 10:34 PM
    Answer

    Hi,

    Based on my understanding, you want to redirect to another website in your classic asp application.  If I have misunderstood you, please feel free to let me know.

    This forum is asp.net forum. You can refer to the same issue : http://forums.iis.net/t/1147015.aspx

    I hope this helps.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Page 1 of 1 (4 items)
Microsoft Communities
Page view counter