Link to home
Start Free TrialLog in
Avatar of mikha
mikhaFlag for United States of America

asked on

one website with two different urls or access point.

I have an asp.net web forms applications that I want to host with a two different URLs , but same domain name.
say, one is abc.mycompany.com and other one xyz.mycompany.com. if possible, i want to deploy my application in one location but can be accessed via two different URLs.

Also, can we set something in IIS or web.config file of the application such that, users coming from abc.mycompany.com are directed to abc.aspx page in the application and
others to xyz.aspx.com ?
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

there are 3 possible ways to go:

1. Customize your codes in ASP.NET that catch the URL, and then by analyze the URL, do the redirection accordingly

2. Try set the IIS Rewrite rules to do the redirection.

3. Since you got different subdomains, you can simply create 2 websites in your IIS, and set its default landing page.
Avatar of mikha

ASKER

@ryan - thanks for your insights.

say for option 3, can I restrict users to just that landing page then. for example,

I set two websites on IIS, user1 comes from abc.mycompany.com and gets redirected to abc.aspx
User 2 comes from xyz.mycompany.com and gets directed to xyz.aspx page.
since it is a same website, user1 can type xyz.aspx in the browser and get access to that page and same for user2.
I want to be able to restrict users so that they can access the pages that they are authorized to?
how many pages you want to restrict here?

only abc.aspx and xyz.aspx respectively?
Avatar of mikha

ASKER

There are couple pages for each .
in that scenario, I would think the easier way would be to set a list of pages in web.config to either allow them to access, or denial access.
Avatar of mikha

ASKER

@ryan - what would be the scenario, if there were more than couple of pages like mentioned. as we are in the subject , it might be helpful to know other alternatives too.
Avatar of mikha

ASKER

@ryan - also, I have never tried this before. so could you point me to a article or example on how to restrict by listing pages in the web config?
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial