W3C home > Mailing lists > Public > www-talk@w3.org > July to August 1997

Mirror program...

From: Mercurio Mobily <merc@dns.iternet.it>
Date: Mon, 14 Jul 1997 19:42:52 +0200 (MET DST)
To: www-talk@w3.org
Message-ID: <Pine.LNX.3.91.970714193322.1789A-100000@micro.iternet.it>

i ma sorry if it's not the best place to make this question, but i've a 
problem that is driving me mad...

I've to write a really short program in Perl that mirrors a Web site.

The flow is quite simple:

sub Visit()
  * Get the firse page 
  * Get the list of all links
  * Visit() all the non-yet-visited pages

I didn't write here all the controls, but it's a simle recoursive 


The point is that if I find a link, i DON'T KNOW if it's a directory of a 
This is what i mean:

<A HREF="/dir1/dir2/file.html>   
Ok, it's easy...

<A HREF="/dir1/README">      
Hummmm... and now? Did I ask for a file  called "README" in a directory 
called "dir1", or did I ask for the file "index.html" in the  directory 

The browser solves the problem, just because it's aqble to understand - i 
don't know how - if the link is a directory or a file, 'cause when you 
click on a relative link he find the good reference... but...

Who can *please* help me?

Ok... sorry if i bored you... :-)

Received on Monday, 14 July 1997 13:42:33 UTC

This archive was generated by hypermail 2.4.0 : Monday, 20 January 2020 16:08:22 UTC