locked
WSS 3.0 externally viewed pages contain links to internal names despite of alternate URLs configured RRS feed

  • Question

  • Hello everybody,

    I am sure I made a simple mistake, but I just don't see it - sorry if this posting sounds dumb.

    At a customer's site, there is SharePoint Services 3.0 SP2 running on an internal W2K3 Web Edition box. Internet Access is done through a simple router which is configured to transfer http requests coming in on the external (fixed) IP to the internal server. The router doesn't Change any host headers.

    The SharePoint website was configured to listen on http://extranet when created. We extended the web application to another IIS site listening for host header www.company.com. The alternate URLs are configured as follows: internal and external URL http://extranet belong to zone Default, internal and external URL http://www.company.com belong to zone Internet.

    I have read "What every SharePoint administrator needs to know about Alternate Access Mappings" (http://sharepoint.microsoft.com/blog/Pages/BlogPost.aspx?PageType=4&ListId={72C1C85B-1D2D-4A4A-90DE-CA74A7808184}&pID=778) Parts 1/2/3 but don't see my mistake.

    What have I done wrong? Thanks for any enlightment.


    Best Regards, Stefan Falk

    Monday, August 27, 2012 7:28 PM

Answers

  • Hi Stefan,

    I understand AAMs can sometimes be confusing. However as I mentioned, AAM is not designed to take care of links which are *manually modified* and *are hardcoded* (uses absolute path instead of relative). I do not have a better way to explain or demo considering this is a forum thread.

    Also, doing link translation is not supported for SharePoint sites so the best way is: As you already know, to fix the absolute references. (Ref: Mistake 2: Assuming that you can use the reverse proxy server link translation feature instead of alternate access mapping in http://technet.microsoft.com/en-us/library/cc288609.aspx)

    HTH. :)


    Please remember to click 'Mark as Answer' on the post that helps you or click 'Unmark as Answer' if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Regards,
    Nishant Shah
    Microsoft Online Community Support

    • Marked as answer by Stefan Falk Tuesday, September 4, 2012 9:21 AM
    Tuesday, September 4, 2012 8:55 AM
    Moderator

All replies

  • Hi,

    Thank you for your question.

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.

     

    Thank you for your understanding and support.

    Regards,

    Xue-Mei Change

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contacttnmff@microsoft.com.


    Xue-mei Chang

    TechNet Community Support

    Tuesday, August 28, 2012 9:09 AM
    Moderator
  • Hello Stefan,

    1) Is there any Reverse Proxy device which is configured to do link translation or changing of host header or forwarding request to internal names?
    2) Are there any hardcoded links containing absolute path (instead of relative path) as a result of editing the webpages or master page in SharePoint Designer?
    3) Is it possible to test this behavior with a new web application?


    Please remember to click 'Mark as Answer' on the post that helps you or click 'Unmark as Answer' if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Regards,
    Nishant Shah
    Microsoft Online Community Support

    Wednesday, August 29, 2012 9:34 AM
    Moderator
  • Hello Nishant,

    Thank you for your answer.

    1) No Link Translation. No ISA/TMG, just a simple router. I have verified by NetMon 3.4 that the host headers of requests from the Internet arriving at the SharePoint box is still www.company.com.

    2) Yes, those hardcoded links are exactly the problem. Users have, for example, uploaded a picture to an image library and just copied the link. This results in links as http://extranet/.../image.jpg, and those don't get translatet to http://www.company.com/.../image.jpg when viewed from the internet.

    3) I could add a new web application for testing purposes. Do I assume correctly: I shall create a new web application with an internal name, extend this with a new external name as I did with the main web application, and test links?


    Best Regards, Stefan Falk

    Wednesday, August 29, 2012 12:00 PM
  • Hello Stefan,

    Let me elaborate more on hardcoded links part as I am not sure if its clear -

    - Lets assume a scenario where the internal SharePoint site is at http://extranet. SharePoint site needs to be customized so SharePoint Designer is used and URLs used  to embed links look like http://extranet/page1.aspx OR http://extranet/Documents/Doc1.docx OR http://extranet/Images/Image1.aspx.
    Now this site is extended to http://www.company.com and users still see the manually added links as http://extranet/page1.aspx OR http://extranet/Documents/Doc1.docx OR http://extranet/Images/Image1.aspx which is EXPECTED as the URLs are entered incorrectly in the first place.

    Correct way to enter URL is with a relative path i.e. ./page1.aspx OR ./Documents/Doc1.docx OR ./Images/Image1.aspx. If this is the scenario in your case then AAMs are not expected to correct it, you'll need to fix it manually.

    About point 3 (applicable if above is not the scenario), yes your understanding is right. I wanted to test with fresh web application, fresh site collection and fresh content just to check.


    Please remember to click 'Mark as Answer' on the post that helps you or click 'Unmark as Answer' if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Regards,
    Nishant Shah
    Microsoft Online Community Support

    Thursday, August 30, 2012 10:43 AM
    Moderator
  • Hello Nishant,

    Thank you again for your clarifications. You named the exact problem, and I guess we will have to make all links relative inside the whole site.

    However then, I don't understand the sense of AAMs. What are they for (besides the possibility of having different authentification providers) if the do *not* ensure that the links are adapted to the particular, different host headers?


    Best Regards, Stefan Falk

    Thursday, August 30, 2012 8:11 PM
  • Hello Stefan,

    Consider the following scenario -

    Current AAM settings:
    Internal URL                        Zone          Public URL for Zone
    http://extranet                    Default       http://extranet
    http://www.company.com   Internet      http://www.company.com

    Lets consider a URL http://extranet/Documents/Doc1.docx. By Design, SharePoint stores all URLs (generated by SharePoint) as relative URLs in DBs. e.g. /Documents/Doc1.docx. Now when the request comes from 'Default' zone, SharePoint will append the Public URL for Default zone to it and hence the end URL will look like http://extranet/Documents/Doc1.docx. If the request were to come from 'Internet' zone then SharePoint will append the Public URL for Internet zone to it and hence the end URL will look like http://www.company.com/Documents/Doc1.docx.

    However, when you edit the web/master page manually, and put absolute links (instead of relative links), SharePoint AAM does NOT come to play at that time. URL will look at the hostname and determine I am looking for a document named 'Doc1.docx' in 'http://extranet/Documents' and since this address is not accessible, the problem.
    Now, when you edit the web/master page manually, and put relative links, SharePoint AAM still does NOT come to play at that time. URL will look at the hostname and determine I am looking for a document named 'Doc1.docx' in './Documents' where . will look up the current site which is http://www.company.com and since this address IS accessible, everything works fine.

    Note: You can open the webpage in SharePoint Designer and do Find and Replace (Ctrl+H in code view); that way at least you can replace all faulty links with correct ones in one go for one webpage.

    HTH.


    Please remember to click 'Mark as Answer' on the post that helps you or click 'Unmark as Answer' if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Regards,
    Nishant Shah
    Microsoft Online Community Support





    Friday, August 31, 2012 7:28 AM
    Moderator
  • Hello Nishant,

    Thank you again. I understand that we have to go through the web site and remove all absolute references to http://extranet.

    I still do not understand the sens of AAM fully, I guess. What for does SharePoint prefix its relative links with absolute ones containing the (right) hots name? What advantage does this have over just delivering the relative links as they are to clients?

    Boy do I miss ISA/TMG at that customer's site... ;-)


    Best Regards, Stefan Falk

    Monday, September 3, 2012 4:52 PM
  • Hi Stefan,

    I understand AAMs can sometimes be confusing. However as I mentioned, AAM is not designed to take care of links which are *manually modified* and *are hardcoded* (uses absolute path instead of relative). I do not have a better way to explain or demo considering this is a forum thread.

    Also, doing link translation is not supported for SharePoint sites so the best way is: As you already know, to fix the absolute references. (Ref: Mistake 2: Assuming that you can use the reverse proxy server link translation feature instead of alternate access mapping in http://technet.microsoft.com/en-us/library/cc288609.aspx)

    HTH. :)


    Please remember to click 'Mark as Answer' on the post that helps you or click 'Unmark as Answer' if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Regards,
    Nishant Shah
    Microsoft Online Community Support

    • Marked as answer by Stefan Falk Tuesday, September 4, 2012 9:21 AM
    Tuesday, September 4, 2012 8:55 AM
    Moderator
  • Hello Nishant,

    OK then, thank you for all your explanations and help!


    Best Regards, Stefan Falk

    Tuesday, September 4, 2012 9:22 AM