okay, as i said i put this query to the university and they came up with the following:
me: i downloaded the module one offline archive following the instructions at http://nameofsite but i find an odd problem.
All the links in the offline pages have a leading '/' which means that whenever you click a link, it points to a location that doesn't exist (ie. you get an error) and this makes all the internal links nonworking.
reply one: It is one of those nice things that Windows based web servers / web editors love to do, that frequently mucks up people when they copy stuff over onto Unix based servers / non MS servers like Apache. Even Apache on W2K doesn't like that style.
me: I tried this at work on windows 2000 as well and had the same problem. Has anybody else noticed this? I wonder if i am missing something obvious...
[b]reply one: This bit should be solved by making sure you follow instructions step 5;
Click 'Unzip'. The file will be unzipped and copied to a folder on your hard disk called c:\T171.
If the files are in this folder on T171 it should work - certainly last years did on w2k, though you might have to then refer to the T171 FAQ about cfm files to solve the 'I clicked on index.cfm and it didn't work' problem.
Note that it will work through 'file open' on the browser, or the rename mentioned above, or even via IIS web server on w2k so long as the root directory filename is T171. It won't work with many other web servers on w2k.
reply two (addressing my tutor): Which browser is he using? There were reports that the offline version of TU170 didn't work well with Netscape 4.7 & Netscape 7, or with Opera. It seems that IE (all versions) & Netscape 6 (as supplied on the Applications CD) were the most successful. I imagine the T171 offline version is built on the same principles.
A change of browser might do the trick for him.
basically, i didn't notice before but the instructions for this offline version state that you must put the folder 't171' within your 'C:\' directory, so that it's all in 'c:\t171\' which i think is really messy. there's no reason to make these links absolute. so the answer is that i have to put the entire t171 folder containing the whole offline site into my root directory. not so good in my opinion. pretty dumb in fact, so i am going to try and figure out how to strip the leading / myself and then post the results for my fellow students to see. as far as i can see, the following four commands must be given
within every single directory in the offline site (in order to catch upper and lowercase tags, and get the pictures to work too).
- Code: Select all
perl -i -p -e "s/HREF=\"\/t171\//href=\"/g;" *.cfm
perl -i -p -e "s/href=\"\/t171\//href=\"/g;" *.cfm
perl -i -p -e "s/src=\"\/t171\//href=\"/g;" *.cfm
perl -i -p -e "s/SRC=\"\/t171\//href=\"/g;" *.cfm
this removes the leading '/t171/' from addresses (which is what i want, or else the relative addresses turn out to have two occurences of 't171/' next to each other).
This isn't too easy to do by hand since there are a *lot* of subdirectories. i wonder if there is an easy way to make these commands automatically recurse? i am sure there is, but knowing nothing about perl, it just is not too obvious to me. should it be an if loop?