Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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