This works, BUT 1. the code is tight and not very easy to understand I tried very hard (for hours) to write it nicely, and found that I couldn't code that way. I could translate it into something more readable now it works if you think that would be helpful. 2. The following is not an issue on nipl.net, as we use suexec. There is a PROBLEM with this whole idea, most webservers under unix run as the user `www-data' or something like that, and run ALL scripts for ALL virtual hosts as the same user. This means that any document which your cgi-script can write to, can also be altered by anyone else who can access that computer and has READ permissions for your directory. If it's just for a little bit of text, this probably won't matter. On my box at least the redirect does pick up the new version straight away. I am pleasantly surprised! Sam