![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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. Here is what I have started with, but as you can see I'm a little stuck. Sub ExtractDomain(ByVal expr As String) Dim sURL As String = Page.Request.Url.ToString() Dim subDomain = InStr(1, sURL, "http://") If subDomain > 0 Then 'True so count over 7 characters Else 'False, so start immediately End If End Sub |
#3
| |||
| |||
|
|
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. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |