3

I am stuck and having hard time solving the issue. If someone can help that would be really great!

My scenario:

I have one simple public web site (https://www.contoso.com/) hosted in IIS in Server A (no SharePoint) and I have another public SharePoint site http://192.168.1.5/ in Server B (no domain) both are working fine if open through their respective address.

But what we need is if we open https://www.contoso.com/sharepoint then it'll pull the content from http://192.168.1.5/ SharePoint site.

I some how managed it by configuring URL Rewrite in Server A, so when I am browsing https://www.contoso.com/sharepoint, it is able to show SharePoint site, but also it has too many 404 errors because SharePoint internally calling many JavaScript, CSS files from root (/) so the end URL becoming https://www.contoso.com/_layouts/15/.... or https://www.contoso.com/somefiles, so due to this it is throwing 404.

Is there anyway to configure this at all?

2

I don't fully understand your entire setup (especially when it comes to the "URL rewrite" part that looks more like a DNS redirection).

Anyway, one important thing here is probably to configure "Alternate Access Mapping" (AAM) on the SharePoint side.
This is needed in case the request SharePoint receives on its network card uses a different host-header than the one SharePoint has been setup with (in your case, SharePoint may receive request with host-header set to www.contoso.com instead of 192.168.1.5; but you want SharePoint to include absolute URLs with 192.168.1.5 in the response instead of the incoming host-name.
To do that, you need to add www.contoso.com as an internal host name in the SharePoint config, mapped to the default zone (192.168.1.5):

  1. Open the SharePoint Central Admin
  2. On the System Settings page, in the Farm Management section, click Configure alternate access mappings
  3. Select the Web application you want to configure a new address for.
  4. Add a new internal address with https://www.contoso.com mapped to the default zone (the default zone is probably already set to http://192.168.1.5): add https://www.contoso.com or http://www.contoso.com (or both depending on how you do the initial redirection).
  • Thanks! May be it is DNS redirection, but I want is this https://www.contoso.com/sharepoint to point to a different server say http://site2/ notice no sharepoint path is there in this URL. It can be easily done for wordpress web site hosted in IIS but it is not working for SharePoint site. (Mainly we do this for better SEO, we use URL Rewrite) I tried with your suggestion but it did not work. – Rahul Kumar Jun 5 '17 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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