I have a website that I'm creating. Ultimately, all of the static resources (images, javascript, css, etc.) will end up on a CDN. However, while designing this site in a local server, I want my hrefs to pull the images locally.
How can I have href="images/logo.png"
for my local site and href="http://ift.tt/2ffhzrX"
on the production site without using dynamic page generation (i.e. the simplest effective solution)? All the ideas I've thought of involve manually creating scripts to pass over the html files, but this solution seems clunky. Is there a more elegant way?
Also, if it helps, I just started using nginx. Maybe there's some kind of rewrite rule for the urls that would accomplish my goal easily?
Aucun commentaire:
Enregistrer un commentaire