Re: Searching URL String for Subdomain value




"CSINVA" <mcse_instructor@xxxxxxxxx> wrote in message
news:1193880562.557651.135010@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have my DNS setup to answer for any subdomain. I need to be able to
look at the URL typed in like "joe.mysite.com" and put the subdomain
in a variable, so I can then look it up in a database. This would have
to work if they typed in http://joe.mysite.com or just joe.mysite.com.


Use System.Uri and the TryCreate method, then check the Host property.


.



Relevant Pages

  • /etc/mail/relay-domains vs. access database RELAY
    ... I have a question regarding the difference between using a relay domain ... If "example.com" appears as a key in the access database with a RHS of ... last two forms match any host or subdomain under the specified domain. ...
    (comp.mail.sendmail)
  • Re: Application_BeginRequest With RegEX Question?
    ... If the subdomain exist in your database than the regex doesnt give back the correct result. ... Dim myConnectionString As String ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: subdomain redirect within application
    ... >>subdomain names to redirect, but within the same application, to the same ... >>within the aplication that then get some data from the database to format ... >>leon information ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: method for addresses masking
    ... > something like this (without using a database): ... but I want to have one php code and sql base placed at ... hide it under short subdomain. ... www.main_domain.com/index.php?userid=23 but with address masking. ...
    (comp.lang.php)

Loading