 |
| ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

June 1st, 2009, 09:16 AM
|
|
Authorized User
|
|
Join Date: Apr 2007
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Open url like http://noida.saamstesting.com
Hello Friends,
I've a folder named "noida" in my project and some pages in that folder And now i've to open those pages like http://noida.saamstesting.com/Page1.aspx .
|
|

June 1st, 2009, 09:20 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
For that to work, you need to do the following:
1. Register the noida subdomain in the DNS server, or make sure the main domain has a star record.
2. Create a new web site in IIS on the web server. Make the root of this new web site point to the noida folder.
From then on, requests to the noida subdomain will be handled bby pages in the physical noida folder.
Cheers,
Imar
|
|

June 1st, 2009, 09:30 AM
|
|
Authorized User
|
|
Join Date: Apr 2007
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hello Sir,
I've created a noida subdomain on my server. But this noida subdomain having a web.config and App_code folder now how i'll point my new web site to noida folder. Can you explain it
Waiting for your reply
Quote:
Originally Posted by Imar
Hi there,
For that to work, you need to do the following:
1. Register the noida subdomain in the DNS server, or make sure the main domain has a star record.
2. Create a new web site in IIS on the web server. Make the root of this new web site point to the noida folder.
From then on, requests to the noida subdomain will be handled bby pages in the physical noida folder.
Cheers,
Imar
|
|
|

June 1st, 2009, 09:32 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
When you create a new site in IIS, you need to supply the root folder. In your case, that's the noida folder.
Imar
|
|

June 1st, 2009, 09:59 AM
|
|
Authorized User
|
|
Join Date: Apr 2007
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
That's mean i've to place my noida folder of my web site into my subdomain(noida) but there is also a web.config file in my subdomain noida. Should i've to make any changes in that web.config file.
Quote:
Originally Posted by Imar
When you create a new site in IIS, you need to supply the root folder. In your case, that's the noida folder.
Imar
|
|
|

June 1st, 2009, 12:01 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
I am not sure what you are asking / what you mean exactly. Can you elaborate? What exactly are you trying to accomplish and what kind of set up do you have? Are other domains or sites involved as well?
BTW: please don't quote the entire message when replying. It only clutters up this thread and doesn't add any value.
Cheers,
Imar
|
|

June 2nd, 2009, 01:48 AM
|
|
Authorized User
|
|
Join Date: Apr 2007
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I explain my problem again. I've designed a website named PropertyProject. In this project i've two folders which are cities specific like noida and delhi. When i open web pages from noida folder it displays the url like http://www.saamstesting.com/noida but i want to that like as http://noida.saamstesting.comor http://www.noida.saamstesting.com. For it i've created a sub-domain into my main domain(saamstesting). And this subdomain folder having a web.config and App_Code folder. So i want to open noida's folder of my project( PropertyProject) pages like this link http://noida.saamstesting.com
And also should i make any changes to the web.config file of noida subdomain folder
|
|

June 2nd, 2009, 12:41 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
I am not 100% sure, but I don't think it can be done as you wish.
What you could do is this:
1. Use the Default web site to intercept all requests not explicitly bound (e.g. whatevercity.domainname.com and so on). Alternatively, bind all city specific URLs to your web site in IIS
2. In Global.asax, in Authenticate_Request or Session_Start, intercept the URL, see if you have a sub folder for it and redirect. That is, rewrite something like noida.saamstesting.com to www.saamstesting.com/noida
However, this will probably change the client URL as well. E.g. a client browses to noida.saamstesting.com and sees the address bar change to www.saamstesting.com/noida as you need to do a client redirect using Response.Redirect. AFAIK, you cannot use Server.Transfer or RewritePath as the two domains will be seen as different application.
Alternatively, you could rewrite at the server to noida.saamstesting.com/noida
Cheers,
Imar
|
|
 |