As described in Horde ticket 11596 the nag application of the Horde Framework is the only application that requires rewrite rules.
When rewriting is not enabled (which is often the default) upon each edit action the user is redirected to a page
ending in path nag/t/save
which is not found on the server. To make nag work the following measures have to be taken:
.htaccess
files has be allowed,/usr/share/horde/nag
)/
the .htaccess
file has to contain a RewriteBase
tag
denoting the base path of the URL.This is how to do all the configuration in detail:
Apache2 comes with a helper script called a2enmod
which takes the name of the module as its parameter.
So, in this case a
a2enmod rewrite
should be sufficient.
The Apache2 configuration file for Horde should look like this (with /Horde
being the base URL and
/usr/share/horde
being the installation root of the Horde web application):
Alias /Horde /usr/share/horde
<Directory /usr/share/horde>
Options FollowSymLinks
AllowOverride Limit FileInfo
<Directory>
Locating the .htaccess
file for nag and optionally setting the rewrite base
In the web directory of the nag application there has to be a local .htaccess
file containing the
following rewrite rules:
allow from all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /Horde
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ rampage.php [QSA,L]
</IfModule>
The text highlighted in green is only required if the Horde application has a base URL different from /
.
The Apache server needs to be restarted after these changes:
service apache2 restart