theyettihunta Posted January 2, 2014 Share Posted January 2, 2014 I know how to edit the systems hosts file to point a url to a local server rather than a public dns... Can I direct a path to a file on the same machine EX: If i open firefox and go to www.wikipedia/elephants.com i want it to open the saved version i have in my documents rather than the ip address of wikipedia. Quote Link to comment Share on other sites More sharing options...
digip Posted January 2, 2014 Share Posted January 2, 2014 (edited) Well, yes and no. No because you're browser is going to try and go to the internet for the name, but yes, because you can change the IP to your own machines in the hosts file, but you're going to need to install something like Apache, and drop in the files for the www directory and serve them from your local IP, or when you then put the name in, it will look at your IP via the hosts file and make it look for it locally running off your own web server service. An easy way to do this(although insecure, so use a VM usually or sandboxed machine) install LAMP/WAMP if on windows, and if on Linux, Apache may be installed already. Personally, I would download a VM like Turnkey Linux setup for using to host a webserver, and set the VM to bridged mode so it can get an IP from your router/gateway, even hardcode it on the servers config to use a static address, then point your hosts file to the VM, and upload the files to the VM's Apache WWW directory or whatever its config path is, ie: /var/www or /var/public_html/, etc. http://www.turnkeylinux.org/lampstack Make sure you change all the default passwords for mysql, phpmyadmin, root, etc. Edited January 2, 2014 by digip Quote Link to comment Share on other sites More sharing options...
BeetleChunks Posted January 3, 2014 Share Posted January 3, 2014 This might be useful: http://stackoverflow.com/questions/18112785/how-to-handle-every-request-in-a-firefox-extension Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.