is it possible to have an htaccess rule that will redirect my files from
http://www.mydomain.com/page.html to http://cdn.mydomain.com/page.html but still making the link look like http://www.mydomain.com/page.html
I know masking urls isn’t possible, but since they are on the same domain i was wondering if that was possible
Try these rules in your .htaccess file:
However one caveat that it is an external redirect hence URL in your browser will change to
http://cdn.mydomain.com/foobecause when you are jumping from one host to another you cannot have internal redirect henceRflag is needed.