Module: nagvis Branch: master Commit: 53e3c65dea80dcfef58b56b39816d5376b87dcf9 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=53e3c65dea80dcfef58b56b39816d5376b87dcf9
Author: LaMi <[email protected]> Date: Wed Apr 21 22:55:44 2010 +0200 Added some mod_rewrite rules to redirect old/invalid URLs - still testing --- etc/apache2-nagvis.conf-sample | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/etc/apache2-nagvis.conf-sample b/etc/apache2-nagvis.conf-sample index 55af2a8..40f9c47 100644 --- a/etc/apache2-nagvis.conf-sample +++ b/etc/apache2-nagvis.conf-sample @@ -21,5 +21,25 @@ Alias @NAGVIS_WEB@ "@NAGVIS_PATH@/share" #AuthType Basic #AuthUserFile @NAGIOS_PATH@/etc/htpasswd.users #Require valid-user + + # With installed and enabled mod_rewrite there are several redirections + # available to fix deprecated and/or wrong urls. None of those rules is + # mandatory to get NagVis working. + <IfModule mod_rewrite.c> + RewriteEngine On + RewriteBase @NAGVIS_WEB@ + + # Use mod_rewrite for old url redirection even if there are php files which + # redirect the queries itselfs. In some cases the mod_rewrite redirect + # is better than the php redirect. + RewriteCond %{REQUEST_URI} ^...@nagvis_web@/index.php.*$ + RewriteRule ^index\.php(.*) @NAGVIS_WEB@/frontend/nagvis-js/$1 [R=301,L] + RewriteCond %{REQUEST_URI} ^...@nagvis_web@/config.php.*$ + RewriteRule ^config\.php(.*) @NAGVIS_WEB@/frontend/wui/$1 [R=301,L] + + # Redirect old map links (FIXME) + #RewriteCond %{REQUEST_URI} ^...@nagvis_web@/frontend/nagvis-js/index.php?map=(.*)$ + #RewriteRule ^index\.php(.*) @NAGVIS_WEB@/frontend/nagvis-js/?mod=Map&act=view&show=%1 [R=301,L] + </IfModule> </Directory> ------------------------------------------------------------------------------ _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
