Basically I want to create a situation where files served from my /cdn directory to use my cdn host rather than the local host.
How can I do this with apache rewrite?
I tried this but it doesnt work =/
RewriteEngine On
RewriteBase /cdn
RewriteCond %{HTTP_REFERER} ^.*\.dev\.*$ [OR]
RewriteCond %{HTTP_REFERER} ^.*\.qa\.*$
RewriteRule ^/cdn/(.*) http://www1.mycdn.com/$1
RewriteEngine Off
RewriteRule ^/blog/(.*)$ /newblog/$1which can be adapted toRewriteRule ^/cdn/(.*)$ http://cdn.example.com/$1– Chris S♦ Apr 14 '11 at 17:50Redirectdirective; eg.:Redirect /cdn http://cdnhost/path/to/redirect– Shane Madden Apr 14 '11 at 18:01