A PHP snippet for managing htpasswd file of Apache

Are you looking for a tool for managing AuthUserFile of Apache? if so, here's a mini php-based htpasswd admin tool for you. maybe it helps.

 http://code.google.com/p/phphtpasswdadmin/

 For now, it's just a draft, if you like it, please reach me and let's make it better.

Enable rewrite in Mediawiki

To those who want to enable rewrite in Mediawiki, please take a look at the following instructions:

  1. Move your Wiki to a sub directory of your site, for instance /w
  2. Create .htaccess in root directory, that is / and add the following lines to it:
  3. RewriteEngine on
    RewriteRule ^wiki/?(.*)$ /w/index.php?title=$1 [L,QSA]

  4. Open your LocalSettings.php and add the following lines to it:
  5. $wgScriptPath = "/w";
    $wgScript = "/wiki";
    $wgArticlePath = "$wgScript/$1";

  6. Done.

Before you try this, please make sure you have enabled the rewrite feature of your Apache. and what the most important is: when you enabled rewrite in httpd.conf, you must stop it and start it. please note, if you just try 'restart', it won't work. i was stuck here for a loooog time. :(