.htaccess to redirect images

I am not sure this will solve the problem, but instead of modifying all the links you could use the BASE element in each page to define a base URI:

From http://www.w3.org/TR/html4/struct/links.html#h-12.4:

When present, the BASE element must appear in the HEAD section of an
HTML document, before any element that refers to an external source. The
path information specified by the BASE element only affects URIs in the
document where the element appears.

Examples:

 <HEAD>
   <BASE href="https://stackoverflow.com/questions/15446835/ImagesBasePath">
 </HEAD>

Or just:

 <HEAD>
   <BASE href="https://stackoverflow.com/">
 </HEAD>

Leave a Comment