Monday, March 14, 2016

Urlrewrite and sharepoint 2013

I some trouble recently getting urlrewrite to play along with SP2013 and IIS 8.
HostNamedSiteCollection wasn’t doable for a lot of other reasons.
Scenario: Using urlrewrites to handle vanityurls for site collections in SP2007. When migrating to SP2013 these rules don’t work at all.

Symptoms: image

  • With outboundrules activated nothing works for webapplication. (Website cannot display the page) 
  • Always lands on top site collection, rewrite dont work.

A combination of a few fixes

  • Install patch kb2749660 to fix outboundrules
  • Add registry key ("HKLM:\Software\Microsoft\InetStp\Rewrite\" (Dword) LogRewrittenUrlEnabled=0)
  • Deactivate Static Compression on IIS-site
  • Add rewrite rule like {HTTP_HOST} matches pattern ^*)


References: - Response is corrupted when you configure an outgoing rule in URL Rewrite Module 2.0 for IIS 7.0 or IIS 7.5 – example (without sharepoint) – similar problem. - rewrite with sharepoint 2013 - why use outbound rules? - supported assymentrical solutions