Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When mirroring a site with a link like www.example.com/some/where/ httracks changes it to www.example.com/some/where/index.html in the local copy.

Is there an option for avoiding the appended index.html?

PS. I am fully aware that the index.html is needed for local browsing of the site, but the thing is that the mirror is going to replace the site on the server. It's a database driven site that is going to be replaced by a static version since it is not going to get updated anymore. But I wish it to be identical to a snapshot of the original site.

If it is not possible I will need to use sed to remove the index.html parts.

share|improve this question
up vote 1 down vote accepted

I ended up using sed:

find . -name '*.html' -exec sed -i 's%index.html%%g' {} \;

It finds all files ending with .html in the current sub directory and runs a sed command on them that replaces all occurences of index.html with nothing, ie. deletes it.

share|improve this answer
    
Could you provide some explanation about what your code does? – Tom Wijsman Nov 1 '11 at 19:28
    
It finds all files ending with .html in the current sub directory and runs a sed command on them that replaces all occurences of index.html with nothing, ie. deletes it. – marlar Nov 1 '11 at 20:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .