0

I want to edit /etc/hosts file for using at localhost.I get some website html file using wget command and I put them to /var/ directory for reaching from browser while being offline.When I write "localhost" to browser,index.html file come.But when I try to click the other tabs,Browser try to reach the "http://....." and nothing came.If I change "http://..." with "localhost/",pages come.How can I edit the /etc/hosts file for browsing offline the site which I was put under /var/ directory? Here is my wget command that I used at backtrack; wget --recursive --level=2 --no-clobber --user-agent=Mozilla --html-extension --convert-links http://...... -P /var/ Thanks in advance.

  • Also "127.0.0.1 localhost" is writen in /etc/hosts file – user3388268 Mar 13 '14 at 15:28
  • I'm sorry to say but I really can't understand what is the problem here. Presuming I'm not a complete idiot, I guess your question might benefit from some re-writing. –  Mar 13 '14 at 15:36
  • Problem is that I cant use localhost on backtrack,apache was running, I write "localhost" on browser and it is open a page which I put to /var/ww.... But when I try to open some tab at the page,it try to go to web and didnt open, I want do it offline from localhost for every page, So What should I write to my /etc/hosts file? – user3388268 Mar 13 '14 at 15:45
  • May be the hyperlinks inside the pages u put inside /var/www.. is fqdn(with some domain names). if u want to access them locally, ether change all embedded urls to localhost or put 127.0.0.1 domain.com in hosts file.(where domain is ur domain) – Randeep Mar 13 '14 at 17:12
  • Yes,I put them to /var/www directory,I know that It is not written at the my question,because stackoverflow.com dont let me – user3388268 Mar 14 '14 at 06:22
  • There is one more solution;editing "href=" "src=" "action=" in all html files.Change "http//www....." to "localhost/".I am working on it but I appreciate for any advice. – user3388268 Mar 14 '14 at 09:01

0 Answers0