I have a site where I am using the CDN module in origin pull mode with Amazon CloudFront. Apache is configured so Drupal will handle www.example.com and static.example.com.
Is there a way to get Drupal to only use the static URL only for my static resources (images, CSS, JS, etc), and redirect other requests to www? Is the only real way to implement a
hook_page_build() and check the Content-Type header to see if it begins with "text/html", and potentially redirect then?