Paul Liebrand's Weblog

Welcome to my blog mainly about SharePoint

Skip to: Content | Sidebar | Footer

Updated: "TinyUrl" like feature for SharePoint

8 September, 2008 (10:31) | SharePoint | By: Paul Liebrand

[Updated – 8/30/2009]

For those of you who have not seen it yet, my SharePoint URL Shortener has been released.  Please see the following posts for more information:

http://paulliebrand.com/2009/08/28/sharepoint-url-shortener-its-finally-here/

http://paulliebrand.com/2009/08/29/sharepoint-url-shortener-codeplex-site-has-been-published-and-is-live/

[Updated – 4/13/2009]

As you have probably seen by now I was unable to get the TinyUrl like feature for SharePoint posted by my self imposed date. At this point I am not sure when I’ll get it posted – rest assure, it is coming.

[Updated – 4/2/2009]

For those who missed my Twitter the other day – My current plan is to release the first version of this feature to CodePlex on 4/12/2009 (perhaps sooner). I’ll let you know if this changes.

 

I have been working on a proof of concept idea to attempt to shorten the URLs that appear in SharePoint. Anyone using SharePoint knows that the URLs can get extremely long and sometimes can be be overwhelming to end-users who have a need to copy and paste them in emails for example.

This feature is not quite complete yet but I thought I would post about it as an early preview.

The basic premise of this feature is to use URL Rewriting, a mechanism to generate a short uniquely ID, and a SharePoint list to store them in.

1. Activating the feature:

image001

2. Navigate to a document library and click the Actions button, or the drop down on a document and select Get ShortUrl

image003

3. You will be redirected to a page that displays the new ShortUrl and it will also automatically copy it to the clipboard:

image005

As you can see the URL generated is http://server/ShortUrl/3V. This URL can now be included in emails, bookmarks, etc and it will always be a direct link to this document.

Even if more than one person selects the Get ShortUrl option on this document, it will always retrieve the same ID.

Stay tuned — I’ll have a downloadable version, instructions, and source available soon.

Thoughts?

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit

  • paulleigh
    We started a small project like this a while ago and released it fairly recently. Only just become aware of your version and of another already launched. http://sharepointshorturl.com/
  • PKo3
    sounds really interesting.
    found your site via twitter and this sound really great.
  • Yes. I am actually working on it as I type this. Thank you for interest. It should be out fairly soon.
  • CD
    Hey Paul, I'm eager to take a look at your source code. Is this project still in the works?
  • Rick Sheikh
    Any updates on this Paul ?

    Thanks,
  • Excellent, had a look at it some time ago, but didn't code it up
    my approach was to add an additional field (tinyURL) to the (system) Item + event handler to generate it when created + URL Rewriting
  • Great Paul;
    Nice and eager to have a look at it.
    Cheers,
    Mukesh Giri
  • rcapple,

    I understand your eagerness for this feature and it is still definitely coming. I'll be wrapping up and large project I am working on pretty soon and then I'll be focusing on getting this feature completed and deployed to CodePlex. As far as being notified when it is done, you really have two choices -- keep checking back, or follow me on Twitter (@PaulLiebrand). I'll use both mediums to announce this features arrival.

    Thank you,

    Paul Liebrand
  • rcapple
    How can I be notified of this when you are done? I am in dire need of this feature for my sharepoint site.
  • Can we contribute a little monetary wise to assist and compensate your efforts out of your busy schedule? We would all really appreciate when you're able to publish your efforts. Thanks.
  • Joel
    Any news on this, and updates?
  • Great idea. Hope to see the code on codeplex, or up on your blog here sometime in the future.
  • Steve
    Paul- this is great! my company email limit on hyperlinks is 132 characters (which results in too many broken links to content within our MOSS environment) Any idea when you'll be blessing the world with your solution?
  • DRC
    Hello Paul,

    I'm sure I speak for everyone here - if you need anything to help bring this project forward, please let us know. Like many others, I've been stuck with a MOSS site that has many 200+ characters paths and this would be a blessing to have.

    - DRC
  • PJ,

    Yes. The concept is to have all the information stored within a SharePoint list so you can easily adjust the "long" URL associated to a "short" URL if it changes.

    Thanks,

    Paul Liebrand
  • PJ
    Hello Paul,

    I am looking into an idea that allows you to put a link into a SharePoint hosted document, which then redirects you to an external webpage. The idea of doing this is if/when the external link changes, you can simply change the redirection destination to the new destination without having to edit the document.

    Will your feature do this, or how would you best appoach this task?

    -PJ
  • Sue Girardier
    Great concept! Any update on when this might be available? I keep checking back hoping...
  • Great stuff, Paul! My main concern would be ensuring that you are storing root-relative, rather than absolute, URLs. That way you don't have to worry about Alternate Access Mappings, renaming servers, etc...

    Obviously, you can't really do much if someone renames other elements of the path (at least, not without some serious event handling).
  • Looking forward to the code for this. Cool.
  • Marco
    Hi Paul,

    Of course it's stored in a SharePoint list. :) Nice work.
    Any idea when you'll be publishing an initial version?
  • Stuart,

    At one point I was attempting to do this and SharePoint was actually very strangely. That is the primarily reason why I decided to implement a solution that does not fundamentally change the way SharePoint works. Without knowing exactly what your code is doing, it would be difficult for me to guess what could be causing that error message.
  • Paul,
    I'm working on a similar idea rewriting URLs using an http module. The actual rewrite is done using "appl.Context.RewritePath(mappedURL)" It works fine except when the mapped URL contains a Managed Path. No error in the http module, but when sharepoint tries to show the page it throws a "Value does not fall within the expected range" error. Any ideas how to get around this? Many thanks. Stuart
  • Marco,

    Thanks for the feedback. The relationship is actually just stored in a SharePoint list.
  • Marco
    Hi Paul,

    Glad your keep coming with great additions for SharePoint.
    Can't wait to get my hands on this little gem!

    Personally I wouldn't show the page showing the url has been copied to your clipboard.

    Where do you store the relation shorturl vs longurl?
  • Yes.
  • erugalatha
    simple awesome! :D been looking for something like this for SharePoint since I first came across TinyURL through using Twitter.

    Will you be making the source code available for the feature?
blog comments powered by Disqus