Recently I bought a CDN and set it up. In my site, the images are stored in a folder named 'images' and the Image urls are obviously linked in this manner. (*Ex : images/some_image.png*)
Since I want to use the CDN right way, I need to rewrite the urls without having to manually change each and every image path.
I tried an .htaccess code which was suggested for a similar problem
RewriteEngine On
RewriteBase /
RewriteRule ^images/(.*)$ http://cdn.mydomain.com/$1 [L,R=301]
But that didn't seem to work properly as all the images were linked improperly.
So I would like to know the changes in this code. Any response would be appreciated.