apache manual and content negotiations

March 8, 2005

Grr, setting up content negotiaion for the apache manual is a pain. Well it really isn't but when I set up apache on my computer I was in a bit of a rush thanks to a ill fated FC3 upgrade, a busted hard disk amd mother board stew. The result was that I didn't do it right the first time as I should have. That in turn meant, when ever I wanted to read the manual I had to do it online, instead of reading the local copy.

Finally I got fed up with it and decided to try to 'fix' the manual. A task that again calls for bit of RTFM, but there is always more than one way to skin a cat. If you are also facing the same problem try this few lines of PHP:

<?
$files = split("\n",`find . -name '*.html.en'`);
foreach($files as $file)
{
$f2 = str_replace('.html.en','.html',$file);
`mv $file $f2`;
}
?>

Hey presto all the html.en files becomes .html and the problem disappers.

Posted by raditha at March 8, 2005 10:44 AM
Your Ad Here

 

Jabber  |  Linux  |  mySQL  |  PHP  |  Java  |  Site Map  |  Wiki

Downloads  |  About  |  Links  |  Contact  |  Home

 

Copyright © Raditha Dissanayake 2003 - 2007

Terms of Use  |  Privacy

 

 

March 2005
Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31