Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Aug 2000 15:54:31 -0700 (PDT)
From:      <jholland@gears.linuxave.net>
To:        Ben Smithurst <ben@FreeBSD.ORG>
Cc:        marcus@redcentre.com, questions@FreeBSD.ORG
Subject:   Re: Web site from NT to FreeBSD
Message-ID:  <Pine.LNX.4.10.10008071553580.17413-100000@gears.linuxave.net>
In-Reply-To: <20000806191340.I65753@strontium.scientia.demon.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
This is verycrude butit seemedto work for me in a similiar
situation....


#!/usr/local/bin/perl -w
foreach $x  (<*htm *html>){
        open (IN,"$x");
        open (OUT,">$x.2");
        while (<IN>){
                chomp;
                        while  (/(\w+)\.HTML?/){
                        $new = lc $1;
                        s/$1/$new/;
                        if (/(HTML?)/){
                         $new2 = lc $1;
                         s/$1/$new2/;
                        }
                }
                print OUT "$_\n";
        }
        close(IN);
        close(OUT);
        system "mv $x.2 $x";
}       

      
John Holland
---------------
        
Email:       jholland@linuxave.net
Web:         http://jbhsoft.linuxave.net
Public key : finger -s or
	     http://jbhsoft.linuxave.net/pubkey.html

On Sun, 6 Aug 2000, Ben Smithurst wrote:

marcus@redcentre.com wrote:

> I have a quick question about porting an NT web site to FreeBSD -
> the site has lots of case inconsistent refs for images (as you would
> expect with NT) - its also 300 pages long - does anybody know of a
> utility that would convert all refs to lower case (for example)?

Well, Mark's solution of using Perl or something to fix the links is
probably best, but if you're using Apache you could look at using the
"mod_speling" module to allow requests in both cases to work.  At least,
I think that's one of the mod_speling modules does, I've never used it
myself.

-- 
Ben Smithurst                 / ben@FreeBSD.org / PGP: 0x99392F7D
FreeBSD Documentation Project /


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.10.10008071553580.17413-100000>