jamieb
jamieb

Reputation: 10033

How do I use mod_pagespeed to rewrite HTML to serve images off my CDN?

I simply want to rewrite pages that contain this:

<img src="http://www.example.com/foo/bar/hello.jpg" />

To be this:

<img src="http://cdn.example.com/foo/bar/hello.jpg" />

I feel like this should be fairly simple, but I've spent three hours reading the docs and trying to do this.

Upvotes: 3

Views: 2444

Answers (1)

igrigorik
igrigorik

Reputation: 9601

  1. Make sure you enable domain rewriting
  2. Then configure your rewrite configuration to use your CDN

That ought to do the trick.

Upvotes: 6

Related Questions