site redirect?

S

Smokey Grindel

Say I have one site that has this structure

http://localhost/ <- public side
http://localhost/internet <- private part of same site protected using NT
Authorization

so say I have two host names mapped to this same site say they are
Http://internet and http://intranet when someone goes to internet it shows
the localhost part, when they go to intranet it shows the intranet folder of
the main site, is there anyway to do this? thanks! The big problem I am
running into is I need two sites in one because of potential data transfer
between them by internal users (only) and they need to be coded as the same
site for public use where to the public on http://domain.com they get the
internet site, but when they go to the http://domain.com/intranet they get
the password protected intranet site... I know this sounds confuseing, but
anyone that knows what im trying to do please let me know if its possible.
thanks!
 
C

Cowboy \(Gregory A. Beamer\)

I am going to disagree with the premise they "need to be the same site", for
a variety of reasons. I will, however, agree that the funcationlity should
be in one place if it is the same. The way to do this is move all but
binding into class libraries, so you can reuse (share) code. You can then
physically (or logically, or both) separate the apps.

As for the question you pose, the answer is yes. You should know the IP
address range internally (probably a class A 10.* network, but you might be
smaller and use 192.*). You write an HTTP handler that automatically shifts
internal users (by IP address) to the network logon section. Understand that
in the simplest model, the root and intranet app are different apps and can
share basic session state only (same token, but no variables). If you bounce
out to a root page, things like

string myString = Session("SetFromIntranetSite");

will not work.If you design according to ASP.NET "Rules", you will not have
an issue, but if you code in an ASP style, you will have to find another
method to persist the session information.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
 
B

bruce barker \(sqlwork.com\)

this is done by creating a second web site on the server. web sites can be
tied to a unique port / header combination. all http 1.1 browser send the
request host name as a header.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top