IIS 7.5 Host header capbilities

securemedical used Ask the Experts™
Conventionally I've only setup host headers for root domains and subdomains. I would like to setup a host header that would understand domain/test and domain/test2 and anotherdomain/test1 Is this possible?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2017
No, this type of setup is not a host header.
You would need to create an index.html file in each folder to redirect back out
or create a URL redirect rule for http://domain/folder to http://folder.domain
rewrite rule
I.e. create a virtual directory for test2 and then set the redirect to http://test2.domain/

In the index file
<meta http-equiv=refresh url="0; http://test2.domain.com">

You could use ASP code to test the request and redirect it by dynamically rewriting the meta line.
the asp page will have to be within each folder.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial