subdomain redirect within application

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Leon

    subdomain redirect within application

    How do I point a sub-domain to a sub-directory or .aspx page of my site
    using
    asp.net?

    I'm using a shared hosting service, that does not offer subdoman forwarding.
    however, you can write your own asp.net redirect code, and I just want to
    the best way to accomplish this task. it's possible that I may could have a
    1000
    subdomain names to redirect, but within the same application, to the same
    page
    within the aplication that then get some data from the database to format
    the current page.

    I know it is possible for me to forward all subdomain name to my site using
    the wildcard(*),
    but is it possible to send all subdomain to the same .aspx page than get the
    beginning of the
    current subdomain such as ("leon.mydomain .com") leon with then grab some
    leon information
    from the database to format the page?

    I know normally domains are setup to point to the root directory of the web
    site. However, how can I detect which URL a person is browsing to on my site
    with ("such as leon.mydomain.c om"), and redirect them to the appropriate
    place on within site ("such as
    mydomain.com/display.aspx?Us erId=1&DisplayI d=10"),
    and where do I want to put this code in default page of the website or in
    the global.asax
    file.

    Thanks!


Working...