I have created a documentation wiki that i want to attach to my main site using an Alias for the virtual host. This allows me to access the wiki by going to website.com/documentation. I have successfully used mod_rewrite in the past for an alias, but i cannot get this one to work. The Alias is setup correctly as the site is working, but no rewrite rules do.
Im using doku wiki, but it should matter what im using as apache does all the work not php. I want to rewrite the url as follows.
The below rewrite rules are meant to be the default out of the box rules that work for dokuwiki, but they aren't doing anything.
RewriteEngine On
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
I tried adding the usual rules that im familiar with and neither of these worked either.
RewriteRule ^documentation/([^/]*)$ /documentation/doku.php?id=$1 [L]
RewriteRule ^([^/]*)$ /doku.php?id=$1 [L]
When i go to http://website.com/documentation/start in the browser i get a 404 error.
The requested URL /documentation/start was not found on this server.