0

I am using sharepoint 2010. Each page has the in the url the following subfolder "Pages". See here an example:

http://mycompany.com/news/Pages/News-overview.aspx

I would like to have something like this:

http://mycompany.com/news/News-overview.aspx

1 Answer 1

1

URL Rewriting is not supported in sharepoint 2010, redirection of a given url is. Its todo with defining between a site and a page issue.

IIS7 can do what your asking for but requires some fiddling!

http://blog.mastykarz.nl/friendly-urls-sharepoint-site-4-steps-iis7-url-rewrite-module/

but what your really talking about is a semantic url in sharepoint 2010.

but unfortunatly as iv said its not supported! you could create a feature, it needs to handle the httprequest module and catch the url, chop it off from / just before page, then remove next / after page and stick the two together. Once that is done stick it back to the url..... its a pain! just like if someone was to reload the page than it would come out with a 404! so you would need to store the actual url first in memory like cookie or session state varible and do some logic, when the page is loaded at any given time if it is by the use (refresh) than use the old url to load the page and then reload the url back to the cut down url else than its a new page or full reload (url taken from server) so you need to do the first steps again!

now doing the above is complex not code wise but how everything is handled and will lead to things breaking! but there is no harm in trying! the logic needs to be sound as some urls will break some wont, sharepoints pipeline is complex and i think its why they didnt inclued it in!

your best bet is url redirect instead or 3rd party features or using iis7

4 ways to do what you want:

http://blog.mastykarz.nl/4-ways-short-urls-sharepoint-server-2010/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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