简体   繁体   中英

How to redirect root web site to site collection

I'm having quite a hard time figuring out this problem and I need your help. Here's the scenario:

I have a sharepoint 2010 web application on my port 80. This has 2 site collections, the root, and the /sites/official. My problem is: The root site is empty, but in the future it will be my something (I don't know what yet), but my other site collection is ready to go and I already have an Internet address for it.

What I want to do is configure everything in way that I can type http://contoso.com and get as response my sub-site (yes, its a kind of redirect)...

how can I do it? What and where should I configure it?

add content editor webpart on your root site collection and put this javascript in that webpart

<script type="text/javascript">
window.location = "http://contoso.com/sites/official"
</script>
  1. Open IIS manager
  2. Right click on your SharePoint website -> Properties
  3. Go to tab Home Directory
  4. Choose A redirection to a URL
  5. fill the URL for redirection. for example: http://contoso.com/sites/official

Notes:

Screenshot:

在此输入图像描述

Add alternate access mapping for the sub-site collection from the central administration.

Central Administration > Application Management > Web Applications > Configure alternate access mappings

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM