On Wed, 23 Mar 2005 15:50:36 +0000, Roy Schestowitz
<newsgroups@schestowitz.com> wrote:
Toby Inkster wrote:
Roy Schestowitz wrote:
Assuming an Apache server, try mod_speling (sic).
CheckSpelling directive needs to be changed -- something which I cannot
do myself. Perhaps I am missing something...
nope, that's ok. Toby assumed you had sufficient privileges to do it.
Is there a script that renames all directories and files to pure
lowercase and then changes all links in the files appropriately?
That's pretty basic so I doubt there's a script for it. To rename the
files to lowercase (in bash):
for $fn in `find -name '*.html' | sort -r`; do mv $fn `echo $fn | tr
[:upper:] [:lower:]`; done
I sort the files in reverse order before processing here so ./Foo/Bar gets
renamed before the folder Foo becomes foo and ./Foo/Bar starts pointing
nowhere.
To do the magic inside the files:
perl -p -i -e 's/(href=".*?")/\L$1/' `find -name '*.html'`
Disclaimer: tested VERY briefly, but should work.
Feel free to ask if you need any modifications/explanations.
Mitja
|
|