Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Linq;
using System.Net;
using System.Security.Cryptography.X509Certificates;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
@brentnewbury
brentnewbury / Example.html
Created October 24, 2014 22:17
URL rewrite rule for Azure CDN with Azure Websites origin which avoids interference from other URL rewrite rules when Azure CDN picks the wrong domain
<html>
<head>
<title>Example.com</title>
</head>
<body>
<img src="//azxxxxxx.vo.msecnd.net/cdn/img/example.png" /> <!-- CDN will receive a HTTP 200 with the image content, thanks to the "CDN Passthrough" rewrite rule -->
<img src="//azxxxxxx.vo.msecnd.net/img/example.png" /> <!-- Normal Azure CDN URI which will recieve a 301 redirect if Azure CDN chooses www.example.com as the origin domain-->
<img src="/img/example.png" /> <!-- Non CDN edge cached content -->
</body>
</html>