Results 1 to 3 of 3

Thread: [2008] IIS issue with web site pointing to another web site

  1. #1

    Thread Starter
    Frenzied Member conipto's Avatar
    Join Date
    Jun 2005
    Location
    Chicago
    Posts
    1,175

    [2008] IIS issue with web site pointing to another web site

    So, let's say I have sites.sitegenerator.com which is the root application of a .net based CMS system. I have several other websites pointing to the same server with different url's (site343.com, site222.com, etc) in IIS, I can create web sites that redirect each of those sites (all pointing to the same public IP) to sites.sitegenerator.com/site343, etc. I would like to know if anyone can think of a way to rewrite these rather than redirect using IIS or a moderately priced rewriting tool. for instance, if I want site343.com to render up active content at ites.sitegenerator.com/site343, how can I do this?
    Hate Adobe Acrobat? My Codebank Sumbissions - Easy CodeDom Expression evaluator: (VB / C# ) -- C# Scrolling Text Display

    I Like to code when drunk. Don't say you weren't warned.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2008] IIS issue with web site pointing to another web site

    It sounds like you have a single codebase and you want this single codebase to handle different URLs with the same pages, but possibly different logos, text strings, so on and so forth.

    I'd use an HttpHandler to intercept these requests. You can set certain app parameters based on the site that's coming in so that when it goes out to the database or the RESX files to get the strings/data out, it has that 'site' paramete with it at all times.

    This of course depends on how you've coded the application, it's possible that what I just suggested isn't even possible for whatever reasons.

    Then again if all you want to do is rewrite, you can use the HttpHandler or global.asax and perform an HttpContext.RewritePath.

  3. #3
    Fanatic Member
    Join Date
    Jun 2005
    Posts
    625

    Re: [2008] IIS issue with web site pointing to another web site

    Do you care what the URL shows? Sometimes you will browse to a site and it will redirect to another site. If you don't mind that, you might want to do something simple, like this:

    For site123, in the default.aspx Page_Load, put:

    Response.Redirect("http://www.site234/")

    The only issue being that the person will have typed site123 in their browser, but will now see site234 in their url.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width