views:

196

answers:

3

Hi,

Is it possible to change the HostName for a request in ASP.Net? We need this for rewriting all requests to abc.xyz.com to abc.xyz.com/sites/abc (we are running Sharepoint).
I understand this is possible with ISAPI. We are running IIS7.

Kind regards,

A: 

Yes I believe it is possible to do that. See the following link. You can use http://urlrewriter.net/ to perform that task. You will need to learn URLRewrite in order to make this work though.

In order to use this in IIS 7 you will need the URLRewrite Module which can be found here.

AboutDev
Hi,I need to write subdomains do subdirectories. It doesn't UrlRewriter on Sharepoint. So if some visits Raw Url: abc.xyz.com, which shows up as "/": , I want the re-written path to be xyz.com/Sites/ which is "/sites/abc" and I additionally want the hostname to be "xyz.com".
SharePoint Newbie
That is definitely possible through URL Rewriter. Just read up some more about it.
AboutDev
Works with IIS 7 Rewrite Module, but not with Url Rewriter. We need to support both IIS6 and 7 :(
SharePoint Newbie
+1  A: 

I would say you need to use something like ISA Server or possibly Squid which is the user facing gateway to your sharepoint installation.

What you're trying to do is definately possible in ISA Server. (I do that on my installation.).

Bravax
ISA Server is overkill IMHO! Squid may do the job but its not HTTP 1.1 compliant. URL Rewriter does the job and even plugs right into the posters' IIS 7 server.
AboutDev
Possibly if you're just using it for that, yes.
Bravax
A: 

Yes, you can use URL Rewrite Module in IIS 7.

notandy