Put a JavaScript on the webpage with this code
$(document).ready(function(){The big downside here is that it depends on JQuery, you'll have to import a JQuery on that page to. So while this is a really quick fix, this took me like 5 minutes to come up with type in and put on-line, importing the whole JQuery library for this lousy toLowerCase() function isn't really that elegant.
//read in the document, this is important
$("a").each(function(index){//now for each link, take the href make it //lowercase and put it back
$(this).attr('href', ($(this).attr('href').toLowerCase()));
});
});
In the end, it'll probably all be done by some Perl script that goes through all the pages and fixes all the html all at once.
The reason was case-sensitivity. I was running an Apache server on Windows and moved it to Solaris. A lot of links didn't work because of characters with a different case. To rectify the situation, I needed to convert filenames and href tags to lowercase.
BeantwoordenVerwijderenFor the content of the files, this is the perl regex that can be used:
1) slurp the file to $content
2) $content =~ s/href="[^#"]+/lc ($&)/ge;
3) burp the $content back to the file
I really should start to learn how to read regex I guess.
BeantwoordenVerwijderen