1RewriteEngine on
2RewriteBase /{farm}
3
4RewriteCond %{HTTP_HOST} !^{farmerhost}
5RewriteCond %{REQUEST_FILENAME} !-f
6RewriteCond %{REQUEST_FILENAME} !-d
7RewriteRule (.*) {farmer}$1?virtual_animal=1 [QSA,L]
8
9RewriteCond %{REQUEST_URI} ^/?$
10RewriteRule ^.*$ {farmer} [QSA,R,L]
11
12RewriteCond %{REQUEST_FILENAME} !-f
13RewriteCond %{REQUEST_FILENAME} !-d
14RewriteRule ^{farmer}([^/]+)/(.+) {farmer}$2?animal=$1 [QSA,L]
15
16RewriteCond %{REQUEST_FILENAME} !-f
17RewriteCond %{REQUEST_FILENAME} !-d
18RewriteRule ^{farmer}([^/]+)/$ {farmer}doku.php?animal=$1 [QSA,L]
19