Rewrite website content to load from subdomain
I am figuring out how to rewrite website content (images/js/css) for faster loading times.
This could also fix a "Access-Control-Allow-Origin" error for me. Is it possible to rewritecontent/dir/file.ext
to开发者_如何学运维
http://content.domain.com/dir/file.ext
Yes it is possible.
However, if your intention is faster load times, you'd be better off changing the URLs in your code than to have Apache rewrite/redirect every request.
Given your current spec, that's the right way to do it.
精彩评论