|
-
Jan 12th, 2009, 09:43 PM
#1
Thread Starter
Frenzied Member
[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?
-
Jan 13th, 2009, 03:07 AM
#2
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.
-
Jan 14th, 2009, 09:10 AM
#3
Fanatic Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|