Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to map a URL to a local file so that when IE sends a request for that URL it gets the content from a local file?

For example: http://www.example.com/file.zip ---> C:\file.zip

I'm trying to achieve a permanent "cache" for some specific files so that IE always retrieve those files from the harddrive. And then I need a way to change the content of those files if needed.

Something like a permanent entry in the IE cache that never expires and is never deleted.

EDIT:
Could this be done with a proxy autoconfiguration file? (those with .pac extension)

share|improve this question
    
This presumably only needs to work on your machine? –  w3d Feb 27 '13 at 23:16
    
Yes, only in my PC and for IE only (although a solution for all browsers is fine as well) –  GetFree Feb 27 '13 at 23:23
    
Can you not use the file:// protocol directly? Or does it have to be a request for an external file that is routed internally? –  w3d Feb 28 '13 at 0:00
1  
Also, do you have control over this external site? Or is it just some arbitrary website? –  w3d Feb 28 '13 at 0:17
    
Yes, it's for a third party website, I can't change the URLs. –  GetFree Feb 28 '13 at 0:39

2 Answers 2

Im not sure why you'd need this. It would worry me for security issues (does he really need to redirect www.mybank.com like that?) But lets assume you have a good reason.

You ask for a hard task; how is the cache to be updated, if it never hits origin servers? What is the criterion for a cache reload? "Never change, unless I want it to change for some reason"

I think the closest you can get is a caching proxy. Id check the docs on squid to see if you can lock certain content in. This won't work (by design) for https sites though.

share|improve this answer
up vote 2 down vote accepted

I found a couple of tools that do exactly this.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.