Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > subdomain redirect within application

Reply
Thread Tools

subdomain redirect within application

 
 
Leon
Guest
Posts: n/a
 
      05-06-2005
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!


 
Reply With Quote
 
 
 
 
Scott Allen
Guest
Posts: n/a
 
      05-06-2005
Hi Leon:

From your description it sounds as if what you want to do is possible.
You want to read about a topic known as URL rewriting.

Here is an article to get you started:
http://msdn.microsoft.com/asp.net/co...lrewriting.asp

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Fri, 6 May 2005 06:54:51 -0500, "Leon" <(E-Mail Removed)> wrote:

>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!
>


 
Reply With Quote
 
 
 
 
Leon
Guest
Posts: n/a
 
      05-06-2005
That it. Thanks Scott!!!!!!!!!!!!!!!!!!!
"Scott Allen" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Leon:
>
> From your description it sounds as if what you want to do is possible.
> You want to read about a topic known as URL rewriting.
>
> Here is an article to get you started:
> http://msdn.microsoft.com/asp.net/co...lrewriting.asp
>
> --
> Scott
> http://www.OdeToCode.com/blogs/scott/
>
> On Fri, 6 May 2005 06:54:51 -0500, "Leon" <(E-Mail Removed)> wrote:
>
>>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!
>>

>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
across subdomain authentication failed on one subdomain while workingon other one saify ASP .Net Security 0 09-28-2009 07:27 AM
Iframes and getting their current URL within Subdomain RyanRitten Javascript 2 07-03-2008 03:29 PM
ASP/ASP.NET page that reacts a special way to items coming from a particular subdomain (programmatically testing subdomain?) Ken Fine ASP .Net 3 02-29-2008 05:35 AM
redirect to subdomain Fastau B ASP .Net Security 0 03-19-2006 03:55 AM
Can't download from a SubDomain using a Redirect Michael Horton ASP .Net 1 04-20-2004 09:17 PM



Advertisments