SharePoint URL query string parameter (RootFolder vs ID)

Sanjay Kumar R 81 Reputation points
2021-07-20T05:22:36.64+00:00

Hi Team,

I am trying to form a pretty URL from the raw URL which is copied directly from the browser.

For example the raw URL(2013 server) will be like,

http://sp.company.com/sites/blah/Documents/Forms/AllItems.aspx?RootFolder=%2Fsites%2Fblah%2Ffolder1%2Ffolder2&FolderCTID=0x00000000000000000000000000000000000000&View=%7123456789%212345%212345%212345%21234568936418%7D

I am trying to form a clean URL by appending the Root url + value of the RootFolder from the query string.
Example:
http://sp.company.com + %2Fsites%2Fblah%2Ffolder1%2Ffolder2

But on the online SharePoint server, when I copy the URL directly from the browser, I am not able to see the RootFolder parameter.

it looks like the below,

https://sp.company.com/teams/SharePointTest2/FederatedDoc/Forms/AllItems.aspx?newTargetListUrl=%2Fteams%2FSharePointTest2%2FFederatedDoc&viewpath=%2Fteams%2FSharePointTest2%2FFederatedDoc%2FForms%2FAllItems%2Easpx&viewid=87f8dD4dcb%2Da3fb%2D4a4a2e7b559a&id=%2Fteams%2FSharePointTest2%2FFederatedDoc%2Ftest%201

I am not sure, whether I should use "id" value to form the clean URL? Please help me in resolving this.

Regards,
Sanjay

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,687 questions
{count} votes

Accepted answer
  1. Emily Du-MSFT 46,166 Reputation points Microsoft Vendor
    2021-07-21T09:34:57.157+00:00

    @Sanjay Kumar R

    The composition of root folder URL in the SharePoint Online and SharePoint server is different.

    You could use following clean URL to access root folder in the SharePoint Online.

    https://sp.company.com/teams/SharePointTest2/FederatedDoc/Forms/AllItems.aspx?id=%2Fteams%2FSharePointTest2%2FFederatedDoc%2Ftest%201


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.