At last, you finished your SharePoint application. It is time to take a last look at your work and celebrate. Opening you app, you see everything is working like a charm. Congrats, dude. But wait what the heck is that long ugly URL doing? As a brilliant developer, you always believe it is not acceptable to deliver a product that is not perfect. What should you do now?
First please allow me give you an example of an ugly, unfriendly URL. This URL is from a very famous Hi-tech company based in USA.? As a courtesy, I replaced it into FOO, just FYI.
http://www.foo.com/PDetail.asp?NewsID=157
Why is this URL so ugly?
From users ?perspectives
As a user of your SharePoint application or visitor to your SharePoint site, it is always good to have a clear URL, meaning users understand what this link all about before they click it. For developers, it is obvious that this ugly URL is a product with id number 157, id is a parameter here. That being said, one thing is surely missing, what is the name of product corresponding to id number 157.
From search engines standpoint
If your SharePoint applications or web sites are for intranet, then search engine is not an issue. However, if you use SharePoint as your public portal, as the company with ugly URL does, having a good search engine ranking is very important. ?According to SEO experts (SEO stands for search engine optimization), such an ugly URL missing a very good opportunity to bolster ranking.
What can we do?
We can always change this sort of URL into beautiful one like this:
http://www.foo.com/PDetail.asp/books/the-world-is-flat
See the difference here?
This URL is far cleaner, simpler, more readable, and easier to recite to somebody aloud than the first one. You know what this URL points to, and search engines know this too, everyone is happy.
How should we make it?
This kind of beautiful URL can be achieved by using IIS Mod-Rewrite, it is a powerful, high quality professional URL rewriting tool for IIS. If you are using Aparche, then using .htaccess will do the trick.? IIS Mod-Rewrite rewrites URLs on the fly by using flexible custom rules and helps web developers and webmasters get the most out of their web applications. It is ideal for Search Engine Optimization, redirecting or improving web usability, blocking undesired traffic and much more.
As a supplement to this post, here is what you need to check if you are using other web servers like Apache.
Pretty permalinks are available under:
- Apache web server with the mod_rewrite module
- Microsoft IIS 7+ web server with the URL Rewrite 1.1+ module and PHP 5 running as FastCGI
- Microsoft IIS 6+ using ASAPI_Rewrite
- Lighttpd using a 404 handler or mod_rewrite
You can download this tool at http://iis.net/downloads/default.aspx?tabid=34&g=6&i=1691
This web site also provides tutorial about this tool.
Be warned though, according to Steve Souders, the author of High Performance Web Site, having too much URL redirect may compromise you web performance by slowing page loading speed. I have not got my hands on high traffic site yet, but, personally, I do not believe this could be a big issue with proper cache and other approaches alike.
What you think? do you have any tips on this? please share with us!