Hosting multiple applications with individual domain names on onehost

M

mc

I would like to host two websites on my brinkster developer account.

I have configured the multiple applications and they both work fine,
they can be access at: -

myalias.brinkster.net/site1

and

myalias.brinkster.net/site2

I have two domain names that I want to point to each of the sites

www.site1.com

and

www.site2.com

however the only facility brinkster offer is to have both the domain
names resolving to the root of my site (i.e. myalias.brinkster.net).

I have placed a default.aspx page with a switch statement based on the
url request and then dot a redirect to myalias.brinkster.net/Site1 or
myalias.brinkster.net/Site2 respectively.

This works and the applications work fine but the urls then read,
www.site1.com/Site1 and www.site2.com/Site2.

I gather I could use URL rewriting to address this issue however all
attempts so far to use context.RewritePath() have resulted in the
applications not working. I get an error about not being able to find my
HTTP Handlers I have defined in the web.config of the application.

Could someone propose a way I could implement URL rewriting or any other
technique to enable me to support this configuration?
 
B

bruce barker

you can not use asp.net url rewriting to go between applications. you'd
need an isapi filter for this (probably not allowed by brinkster).

if you convert the two sites into one vdir then you can use url rewriting.

-- bruce (sqlwork.com)
 
M

mc

Unfortunately this would require a full rewrite of both sites as the
applications use many application relative "~" paths.

Your probably right brinkster are very unlikely to allow me to have
personal ISAPI filters.
 
S

Steven Cheng[MSFT]

Hi MC,

I also think using IIS isapi filter would be the prefered appraoch since
that can help avoid involving such additional redirection code logic into
our ASP.NET web application's code. Anyway, you can try contact your web
hoster to see whether this is possible.


Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



This posting is provided "AS IS" with no warranties, and confers no rights.
 
M

mc

Maybe I'm missing something, but what does it matter what the URLs read
if all the paths are relative?
Well, it matters nothing when you enter the site from the domain name
alone (and browse the site from there) or you don't look at the
addresses bar but when you want to go to a specific area to a site it
means you need to type in an extra directory in the url

if I bookmark my news page the bookmark will be
http://www.site1.com/Site1/News/index.aspx.

I dont want the extra Site1 in the url.
 
M

mc

Steven said:
Hi MC,

I also think using IIS isapi filter would be the prefered appraoch since
that can help avoid involving such additional redirection code logic into
our ASP.NET web application's code. Anyway, you can try contact your web
hoster to see whether this is possible.


Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



This posting is provided "AS IS" with no warranties, and confers no rights.
I have just had my suspicions confirmed, Brinkster will not permit the
addition of ISAPI filters on there shared hosting packages.

Is there a purely ASP.NET solution?
 
S

Steven Cheng[MSFT]

Hi MC,

Thanks for the reply.

I'm afraid a pure ASP.NET solution would be quite limited here. This is
because for file path redirection, what we have is url rewriting, however,
this has no effect on directory based path (such as Http://server/app/dir1/
) since they're not processed by ASP.NET engine. BTW, how are you using the
Context.RewritePath currently? Are you using a custom httpModule and do the
url rewriting in it? Here is a msdn article detailed describe add URL
rewriting in ASP.NET application:

#URL Rewriting in ASP.NET
http://msdn2.microsoft.com/en-us/library/ms972974.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 
L

Larry Bud

mc said:
Well, it matters nothing when you enter the site from the domain name
alone (and browse the site from there) or you don't look at the
addresses bar but when you want to go to a specific area to a site it
means you need to type in an extra directory in the url

Who types in URLs to a specific page?
 

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

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top