While in the process of setting up a Dokuwiki install I came across a problem with generating clean URLs using Apache rewriting.

The installation comes with a default .htaccess which is,

RewriteEngine on
 
RewriteBase /dokuwiki
 
RewriteRule ^_media/(.*)              lib/exe/fetch.php?media=$1  [QSA,L]
RewriteRule ^_detail/(.*)             lib/exe/detail.php?media=$1  [QSA,L]
RewriteRule ^_export/([^/]+)/(.*)     doku.php?do=export_$1&id=$2  [QSA,L]
RewriteRule ^$                        doku.php  [L]
RewriteCond %{REQUEST_FILENAME}       !-f
RewriteCond %{REQUEST_FILENAME}       !-d
RewriteRule (.*)                      doku.php?id=$1  [QSA,L]
RewriteRule ^index.php$               doku.php

However on 1and1 shared hosting when serving Dokuwiki directly from the domain root directory I need the following change,

RewriteEngine on
 
RewriteBase /
 
RewriteRule ^_media/(.*)              lib/exe/fetch.php?media=$1  [QSA,L]
RewriteRule ^_detail/(.*)             lib/exe/detail.php?media=$1  [QSA,L]
RewriteRule ^_export/([^/]+)/(.*)     doku.php?do=export_$1&id=$2  [QSA,L]
RewriteRule ^$                        doku.php  [L]
RewriteCond %{REQUEST_FILENAME}       !-f
RewriteCond %{REQUEST_FILENAME}       !-d
RewriteRule (.*)                      doku.php?id=$1  [QSA,L]
RewriteRule ^index.php$               doku.php

While the moment I thought of this it became obvious the documentation within the file suggest this is an unlikely value to edit and also presents it elsewhere to the RewriteEngine so not as obvious as I thought it could be.

Review The Second Machine Age

A quick review of The Second Machine Age. Continue reading

Threads by Ruth Notman a great folk album

Published on July 16, 2017

MuSA 2017 Karlsruhe

Published on July 11, 2017