Relative URLs in a URL field in a list RRS feed

  • Question

  • This is one instance of a general problem I have. I am running SharePoint Foundation 2010 on SBS 2008 Standard. I have a Company Directory list in an HR subsite of the main Companyweb site (which is not the default web site). In that list are three URL fields that link to a biography, brief biography, and CV for that user. The documents are stored in virtual directories in the root of the Companyweb site.

    No matter how I try to enter the URLs, "http://companyweb" gets added. The problem is that a URL such as http://companyweb/CVs/{username}%20CV.docx only works when the user is connected to the internal network and getting DNS from the SBS server. When the user is accessing the site remotely the correct URL is https://{server external name}:987/CVs/{username}%20CV.docx. Obviously a relative URL is the solution to allow access in either way.

    SharePoint handles the issue of different beginnings for the URL pretty well in most cases. But not in this case where it won't let me enter a relative URL into a list item.  Is there any way I can force SharePoint to accept a relative URL?

    • Edited by JonFleming Tuesday, June 4, 2013 6:16 PM
    Tuesday, June 4, 2013 6:15 PM

All replies

  • It should allow relative URL like '/CVs/{username}%20CV.docx'. Is there any specific error ??


    Joydeep K.

    Tuesday, June 4, 2013 7:43 PM
  • Is this a SharePoint directory you are using? If so i'd expect it to handle the relative URLs happily as long as you've got AAM configured, I suspect it isn't which makes life more interesting all round.

    If it's not in SharePoint then i don't think it will let you enter the URL value into a 'URL' field, you might need to get clever and create a text field or use some fancy JQuery wizardry to re-direct the link when it's coming in from the external source.

    Thinking about it, jQuery would be my choice.

    Tuesday, June 4, 2013 8:03 PM
  • It does not allow such URLs. There is no error message, but it adds "htttp://companyweb" to the beginning of every relative URL when I click "Save".

    {ABE} Actually it adds whatever servername I'm using to connect to the beginning of the relative URL. I.e. "https://{external name}:987" or "htttp://companyweb".

    • Edited by JonFleming Thursday, June 6, 2013 4:08 PM
    Thursday, June 6, 2013 3:57 PM
  • Well, yeah, I've got some jquery already and with  Steven Levithan's parseUri I could do it ... but it's ugly. I'm hoping for a cleaner solution.

    It's a virtual directory inside the SharePoint site in IIS.

    I'm not sure what AAM would be appropriate. "http://companyweb" is default, 'https://{external name}:987" is custom. I've tried the SSL link as Internet and it makes no difference.

    • Edited by JonFleming Thursday, June 6, 2013 4:09 PM
    Thursday, June 6, 2013 4:00 PM