ScriptAlias /nagios/cgi-bin /usr/local/www/nagios/cgi-bin Options ExecCGI FollowSymLinks AllowOverride None Order allow,deny Allow from all RewriteEngine on RewriteCond %{REMOTE_ADDR} =83.86.204.79 [OR] RewriteCond %{REMOTE_ADDR} ^192\.168\..*$ RewriteRule .* - [E=REMOTE_USER:nagiosadmin] Alias /nagios /usr/local/www/nagios DirectoryIndex index.php AddHandler application/x-httpd-php .php Order allow,deny Allow from all Alias /pnp4nagios /usr/local/www/pnp AddHandler application/x-httpd-php .php Order allow,deny Allow from all RewriteEngine On Options FollowSymLinks # Installation directory RewriteBase /pnp4nagios/ # Protect application and system files from being viewed RewriteRule ^(application|modules|system) - [F,L] # Allow any files or directories that exist to be displayed directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Rewrite all other URLs to index.php/URL RewriteRule .* index.php/$0 [PT,L]