subdomain redirect within application

L

Leon

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.com"), and redirect them to the appropriate
place on within site ("such as
mydomain.com/display.aspx?UserId=1&DisplayId=10"),
and where do I want to put this code in default page of the website or in
the global.asax
file.

Thanks!
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top