Home How can you rewrite linked external URL domains for specific files to a locally hosted file using nginx (preferred) or Apache ModRewrite (or similar)?
Reply: 0

How can you rewrite linked external URL domains for specific files to a locally hosted file using nginx (preferred) or Apache ModRewrite (or similar)?

user3383951
1#
user3383951 Published in 2017-12-07 15:55:01Z

I am looking for a way to rewrite all links in HTML code matching a specific file type or name from a external domain to locally cached versions automatically. Is their a way this can possibly be done with something like Apache Mod Rewrite, or preferably nginx?

For example if the local web server has links to http://remotehost.com/unsecure111.jpg I want the local server to rewrite all instances of that link with https://localhost.com/cache/secured111.jpg. Is their any way this can be done in nginx or apache with a mod or extention?

Thanks for any suggestions!

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.307456 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO