Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise. I am using publishing portal. And currently suppose my root site domain name is www.abc.com, and there is a sub-site called sub1, then the root address of sub-site is www.abc.com/sub1, how to change the sub-site's root address to sub1.abc.com?

Programming solution or non-programming solution are both fine.

share|improve this question
    
Please use meaningful tags. publishing-site has nothing to do with the question any more than what your client os is. Something like alternate-access-mappings or alternate-paths would be much better. –  Mike Oryszak Jan 14 '10 at 1:47
add comment

3 Answers

I think an important thing to point out here is that this is completely unsupported by Microsoft. One of the key issues is that you are changing something other than the host portion of the URL (because the modified URL does not end in "/sub1"), and Alternate Access Mappings (AAM) are not designed for this kind of scenario. The result is that you will have problems with URLs in things like alert e-mails, RSS feeds and potentially some areas of the website itself e.g. Content Query Web Part (to pick one example).

Plan Alternate Access Mappings has this to say:

Some reverse proxy devices can modify the path of a request (the portion of the URL that comes after the hostname and port number) in such a way that a request sent by the user to http://www.contoso.com/sharepoint/default.aspx, for example, is forwarded to the Web server as http://sharepoint.perimeter.example.com/default.aspx. This is referred to as an asymmetrical path. Windows SharePoint Services 3.0 does not support asymmetrical paths. The path of the URL must be symmetrical between the public URL and the internal URL. In the preceding example, this means that the "/sharepoint/default.aspx" portion of the URL must not be modified by the reverse proxy device.

Whether the URL modification is done by a reverse proxy device or code, the support constraint applies.

I've also seen code-based URL-rewriting solutions which have a terrible impact on performance (due to having to parse/rewrite the output stream).

Tread carefully!

share|improve this answer
add comment

Theres no OOTB functionality for asymmetrical paths in SharePoint.

You could probably do some magic combining AAM (Alternate Access Mappings) with a HttpModule, but it would be hard to maintain (new urls) and easy to break (deleted pages). AAM to create the sub1.abc.com mapping, HttpModule to intercept request and redirect.

hth Anders Rask

Some linkage:

share|improve this answer
    
OOTB means? What means asymmetrical paths? –  George2 Jan 13 '10 at 8:55
1  
Out Of The Box. With asymmetrical i mean pointing from a root url to a sub site. Read my post again with added details. –  Anders Rask Jan 13 '10 at 8:59
    
I read the links, do you mean I can implement the function by using alternative access mapping or using http module? If yes, how? –  George2 Jan 13 '10 at 9:04
    
I suggested that would be the way i would start (combining AAM and HttpModule), if i was to try and implent it. But im not -you are! ;-). Basicly what im saying is you need to create a Proof Of Concept trying different approaches. Since its a frequent request someone might already have coded this, so you also could use your old frield Google to see if someone did. –  Anders Rask Jan 13 '10 at 9:33
add comment

You could also check out the possibility to use multiple root-level site collections. This means that you can have several URLs on the same web app and each one pointing to their own site coll. Here is a great document for setting it up with WSS 3 Creating Shared Hosting Solutions on Windows SharePoint Services 3.0 This might not be exactly what you need, but I thought it was important to mention.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.