IIS Server - xyz.mydomain.com forward to www.mydomain.com/xyz?

This is Interesting: Free IT Magazines  
Home > Archive > IIS Server > November 2004 > xyz.mydomain.com forward to www.mydomain.com/xyz?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author xyz.mydomain.com forward to www.mydomain.com/xyz?
Noah

2004-11-10, 5:50 pm

I'm going to be creating many subdomains, possibly hundreds, and I don't want
to create each one. Is there a way to have ***.mydomain.com automatically
forward to www.mydomain.com/*** ?

Thanks so much!

noahsw@nospam.cyberdude.com

- Noah
[Tony Devere]

2004-11-29, 5:53 pm

If you're bound to an IP... then you don't even need to use host headers.
BUt if you have to use host headers, then there is no way to get one host
header to answer for many others. etc... *.domain.com ...

Let me know if you need some sample code on how to add host headers
programmatically.


Thank you,

Tony DeVere [MSFT]
Microsoft IIS
Newsgroup Support
tdevere@online.microsoft.com

"Please do not send email directly to this alias. This is our online
account name for newsgroup participation only."

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2001 Microsoft Corporation. All rights
reserved.

Noah Spitzer-Williams

2004-11-29, 5:54 pm

Hello Tony,

Yeah can you send me some sample code and where I would put this in? Is
there no way to intercept requests to IIS before IIS handles them?

Thanks!

- Noah

"[Tony Devere]" wrote:

> If you're bound to an IP... then you don't even need to use host headers.
> BUt if you have to use host headers, then there is no way to get one host
> header to answer for many others. etc... *.domain.com ...
>
> Let me know if you need some sample code on how to add host headers
> programmatically.
>
>
> Thank you,
>
> Tony DeVere [MSFT]
> Microsoft IIS
> Newsgroup Support
> tdevere@online.microsoft.com
>
> "Please do not send email directly to this alias. This is our online
> account name for newsgroup participation only."
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> You assume all risk for your use. © 2001 Microsoft Corporation. All rights
> reserved.
>
>

[Tony Devere]

2004-11-30, 6:21 pm

Yes... I suppose you could write an ISAPI filter and configure it to
forward requests to a web site. But that may be some coding...

The sample code I have is just that... sample... with some modification you
could use it to add host headers dynamically...

Imports System.DirectoryServices


Private Sub CreateHostHeader()
Dim strPath As String = "IIS://localhost/W3SVC/1"
Dim myDE As New DirectoryEntry(strPath)
Dim iisWebSrvProperties As PropertyCollection = myDE.Properties

Try

iisWebSrvProperties("ServerBindings").Add(":80:myHostHeaderTest1")
myDE.CommitChanges()
Catch ex As Exception

End Try

End Sub


Thank you,

Tony DeVere [MSFT]
Microsoft IIS
Newsgroup Support
tdevere@online.microsoft.com

"Please do not send email directly to this alias. This is our online
account name for newsgroup participation only."

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2001 Microsoft Corporation. All rights
reserved.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com