views:

549

answers:

2

My goal is to implement the following scheme using the subdomain and path as attributes:

Use a wildcard DNS entry that routes any subdomain to the root site: Example:

*.example.com 
ex: http://xyz.example.com 
to
http://example.com

Next I want to rewrite the requests to point to a specific page, passing both the subdomain and the request path as attributes.

Example:

http://xyz123.example.com/images/header.jpg 
to
http://example.com/get.aspx?id=xyz123&path=/images/header.jpg

I've seen several questions on here regarding similar goals, but not quite the same. I'm new to using rewrite rules, so any help is appreciated. I will update this as I make progress.

A: 

you can implement this with the of help

Managed Fusion URL Rewriter and Reverse Proxy

Muhammad Akhtar
A: 

for IIS7, url rewrite functionality is built-in. Rules are set in web.config. For IIS6 you need an ISAPI dll that does the same for you. Use IIRF, it works just fine.

hetu