Apache, mod_rewrite et server-status
Options -Indexes <IfModule mod_rewrite.c> RewriteEngine on # if your app is in a subfolder # RewriteBase /my_app/ # Allow server-status RewriteCond %{REQUEST_URI} !=/server-status # test string is a valid files RewriteCond %{SCRIPT_FILENAME} !-f # test string is a valid directory RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.*)$ index.php?uri=/$1 [NC,L,QSA,B] # with QSA flag (query string append), # forces the rewrite engine to append a query string part of the # substitution string to the existing string, instead of replacing it. </IfModule>
Pour utiliser le server-status (dans Munin ou Nagios par exemple), il faut que la ligne soit ajoutée en tête des tests :
# Allow server-status RewriteCond %{REQUEST_URI} !=/server-status