IIS7 SNI Rewrite – Howto

August 21, 2014


Windows XP Users with IE8 are unable to connect to your Server Name Indication (SNI) enabled Amazon CloudFront distribution.


Do not rewrite URLs to CloudFront if the user agent indicates a system that does not support SNI.

Example (IIS 7)

Be sure to have the URL Rewrite module installed

URL Rewrite rule precondition to not rewrite static assets to the CDN for user agents that match Windows XP, Blackberry, Windows Mobile, Android 1.x-2.x, or Nokia Operating systems

Outbound Rewrite Precondition

<add input="{HTTP_USER_AGENT}" pattern="(Windows\sNT\s5\.\d;|BlackBerry|Amazon CloudFront|Android\s2\.[012]+|Windows\sMobile|Series60|IEMobile)" negate="true" />