How to redirect a URL to a local file?
16,901
- Edit
%Windows%/System32/driver/etc/hosts
- add
127.0.0.1 www.download.windowsupdate.com
- add
- Install a local webserver (e.g Apache)
- configure it to serve the file
- set the DocumentRoot to (say) c:\temp
- either copy
C:\authrootstl.cab
toC:\Temp\msdownload\update\v3\static\trustedr\en\authrootstl.cab
- or configure a URL rewriting rule
- configure it to serve the file
Without the rewriting rules you could use any simple HTTP server, such as tthttpd. You could also use IIS etc etc
Related videos on Youtube
Author by
Jader Dias
Perl, Javascript, C#, Go, Matlab and Python Developer
Updated on September 17, 2022Comments
-
Jader Dias over 1 year
I am trying to make Windows access
C:\authrootstl.cab
when it tries to GEThttp://www.download.windowsupdate.com/msdownload/update/v3/static/trustedr/en/authrootstl.cab
. Is it possible?-
Arjan over 13 yearsIs this done using a browser?
-
-
Arjan over 13 yearsThis would rewrite all files from
www.download.windowsupdate.com
to localhost; don't know if that's a problem. If so, then combining Fidler with a local web server might do the trick. -
user5249203 over 13 yearsTrue, You could get Apache to reverse proxy the others (using an IP-address for the
www.download.windowsupdate.com
. Not sure how deep a rathole is justified by the need to fake the cab file. -
Jader Dias over 13 yearsis it possible without a web server?
-
user5249203 over 13 yearsIt isn't possible without a HTTP server because the client is attempting to connect using HTTP. However the HTTP server need not be on the same PC, it could be any web server anywhere, to which you have access to either the main configuration or (in Apache terms) to a vhost configuration. You still have to change
hosts
on the PC to direct it to the IP-address of the webserver you control.