Month: January 2017

A Better Way to redirect a site collection in SharePoint using IIS URL Rewrite

Have you every written a blog post, and got some helpful comments from folks who have a better way to do something? Well that’s exactly what this is! My last blog post http://www.techrevmarrell.com/create-a-sharepoint-vanity-ish-shortened-url-and-redirect-to-a-site-collection/ Was about a requirement I had to create a shortened URL that they could provide to users and this shortend url would automatically redirect a user to another site collection. Well the method I ended up using was to create an explicit Managed Path to create the shortened url. Some asked why I just didn’t use a DNS entry, and for my particular requirement, it wasn’t available to me, nor was a redirect at the load balancer level. So for the URL shortner explicity Managed Path. Again to see how I did it, you can check out the link above. Now the second thing I did was create a webpart page, and add a JavaScript redirect (really just meta tag redirect) to the homepage of the site collection that I wanted to redirect. I mentioned this wasn’t the cleanest option and I’d already tried to utilize IIS URL Rewrite to solve my issue, and I had, (will come back to this shortly) but when my users did some testing on my solution, everything was great on the Desktop side, but on the mobile device side the solution failed. And this was because I used a web...

Read More

Create a SharePoint Vanity-ish / Shortened URL and redirect to a site collection

Update!!!!! 1/26/2017 I was wrong. I found a much better way to redirect a user to a site collection actually using IIS URL Rewrite. The Managed Path shorten method below is still great, and if you don’t have the ability to use IIS URL Rewrite, then perhaps the script redirect method here will help, but if you have access to IIS URL Rewrite, check out my new post here. http://www.techrevmarrell.com/a-better-way-to-redirect-a-site-collection-in-sharepoint-using-iis-url-rewrite/     I’ve recently ran into a requirement where a user wanted basically a Vanity URL and use it for a SharePoint site. Not for SEO purposes, but because they wanted to make an easier url for users to remember how to get to a common site collection. Most of the time a SharePoint site collection that is not the root site will have a url such as http://Contoso.com/sites/teamA or worse if it’s a subsite, http://Contoso.com/sites/teama/wheredidmysubsitego. When what you may really want is a simple shorten url like http://contoso/HR. My Requirement In my requirement the page’s url was something like http://contoso.com/sites/videos/pages/helpfulvideos.aspx and they really wanted the user to type in something like http://contoso.com/videos, and get redirected to the actual page above. So I needed 2 things. A way to create a “Vanity-ish” URL in SharePoint. I say “Vanity-ish”, because it’s not truly ReWrite that you would use in SEO, where the appliance rewrites the original urls so any pages...

Read More

Twitter Posts