简体   繁体   中英

SharePoint removing trailing slashes in URL's

I'm havig an issue with SharePoint 2010 Removing trailing slashes from URL's; I have 3 scenarios where this happens outlined below: ( all are happening on a Publishing Site )

If I have a Summary Links Web Part and setup a link, let's say to an external site, that requires a trailing slash, when the page is saved it is removed and the link no longer works. I have tried adding 2 slashes as suggested by some googling, this works the 1st time you save the page as the last slash is removed, but edit the page again and save, and again the other slash is removed.

The second scenario, which is far more serious, is I have created a custom Master Page, with some static links embeded in it, and as before require the trailing slash. When I changed the Alternate Access mappings in Central Admin( because I was putting a new site from development into Production with existing DNS entries on our network...) SharePoint somehow removed all trailing slashes from Links in my master page; what's even worse is that there was no version created, no way to revert it except manually checkout and re-edit the page and check it in again. This scenario, because no checkout or versioning happened, makes me think that a database procedure or routine fired that removed the slashes.

The 3rd scenario is the same as the second except I moved a site using the Manage Content and Structure underneath another one.

I don't know if these are the only time it happens, haven't had tme to test any other scenarios.

OK to my question, is this a setting or feature of SharePoint 2010 that can be turned off? or is it sounding more like a BUG

I'd love to say "you shouldn't need the trailing slash as required" but unfortunately reality does not always support that.

Regarding the Summary Links webpart. Have you tried writing it the long way around with a Content Editor Web Part or a Links list and then adding a Links webpart to the page?

2nd/3rd scenario: Are you sure they links are correct after checking in the master page? Could you try to add the links on the fly with javascript? Not great performance-wise, but it buy you some time to figure it out the correct way later.

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