in reply to What regex will swap somewebpage/ with somewebpage/index.html ??
Change that last regex to:
$address =~ s!http://(www.(?:[^/]*/*)*)!$1/index.html! [download]