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.

link|improve this question

80% accept rate
feedback

1 Answer

up vote 0 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.

link|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
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.