1

We can accomplish this by editing the Registry and by using AutoHotkey. I called my script OpenAsLocalhost.ahk, and used similar names for my example.
Compile the following AutoHotkey script:
file = %1%
server = C:\
StringReplace, url, file, %server%, http://localhost/
StringReplace, url, url...