virtual subdomain without ISAPI [modified]
-
hi a project i'm going to undertake will require a user system which generates a virtual subdomain for users who register with my site. For example the user john signs up and is given a subdomain to access his account, john.website.com, which when rendered in the browser will automatically bring up http://website.com/profile.php?username=john or similar. How can this be acheived? I know it can be done with ISAPI_REWRITE I want to use my code for it. I work ASP.NET. tanks. MK4 modified on Saturday, November 1, 2008 3:13 AM
-
hi a project i'm going to undertake will require a user system which generates a virtual subdomain for users who register with my site. For example the user john signs up and is given a subdomain to access his account, john.website.com, which when rendered in the browser will automatically bring up http://website.com/profile.php?username=john or similar. How can this be acheived? I know it can be done with ISAPI_REWRITE I want to use my code for it. I work ASP.NET. tanks. MK4 modified on Saturday, November 1, 2008 3:13 AM
AFAIK its more of an IIS and DNS configuration thing and outside the realm of control of your app. Once your app gets the request however, you can look at the domain on which the site is being accessed (from your "default.aspx" maybe or even from an HTTP handler) by inspecting the HTTP headers and appropriately redirect or transfer to another page. But from looking at the URL that you want to redirect to, it looks like you're using PHP though and not ASP.NET?! :confused:
-- gleat http://blogorama.nerdworks.in[^] --
Number Two's eyes narrowed and became what are known in the Shouting and Killing People trade as cold slits, the idea presumably being to give your opponent the impression that you have lost your glasses or are having difficulty keeping awake. Why this is frightening is an, as yet, unresolved problem. -- HHGTG
-
AFAIK its more of an IIS and DNS configuration thing and outside the realm of control of your app. Once your app gets the request however, you can look at the domain on which the site is being accessed (from your "default.aspx" maybe or even from an HTTP handler) by inspecting the HTTP headers and appropriately redirect or transfer to another page. But from looking at the URL that you want to redirect to, it looks like you're using PHP though and not ASP.NET?! :confused:
-- gleat http://blogorama.nerdworks.in[^] --
Number Two's eyes narrowed and became what are known in the Shouting and Killing People trade as cold slits, the idea presumably being to give your opponent the impression that you have lost your glasses or are having difficulty keeping awake. Why this is frightening is an, as yet, unresolved problem. -- HHGTG
hi i find a way to do it. 1. DNS must be configured. like *.example.com IN A 10.10.10.10(the site's IP) 2.IIS must be configured such every request to example.com by every subdomain go through ASP ISAPI 3.A HttpModule must be created to handle those request and convert it to actual address. LIKE subdomain.example.com ----> www.example.com/query?id=subdoamin. thanks. bye.
MK4
-
hi i find a way to do it. 1. DNS must be configured. like *.example.com IN A 10.10.10.10(the site's IP) 2.IIS must be configured such every request to example.com by every subdomain go through ASP ISAPI 3.A HttpModule must be created to handle those request and convert it to actual address. LIKE subdomain.example.com ----> www.example.com/query?id=subdoamin. thanks. bye.
MK4
Hi. I have the same problem .Do you know any online HttpModule sample? I have no idea about it. regards. mehran