From 34bdd032c191b503520f9cce8e4d64803031c3fe Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Mon, 20 May 2013 21:37:46 +0200 Subject: remove dependency on mod_rewrite for rrd.php Use $_SERVER['PATH_INFO'] instead. --- .htaccess | 2 -- rrd.php | 2 +- type/Default.class.php | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.htaccess b/.htaccess index 3272499..889dfc6 100644 --- a/.htaccess +++ b/.htaccess @@ -8,5 +8,3 @@ Options -Indexes RewriteEngine On RewriteRule ^.git(ignore|/) - [F,L] - -RewriteRule ^rrd/(.*) rrd.php?path=$1 diff --git a/rrd.php b/rrd.php index 58614a0..a6f341a 100644 --- a/rrd.php +++ b/rrd.php @@ -4,7 +4,7 @@ require_once 'conf/common.inc.php'; require_once 'inc/functions.inc.php'; require_once 'inc/html.inc.php'; -if ($file = validateRRDPath($CONFIG['datadir'], $_GET['path'])) { +if ($file = validateRRDPath($CONFIG['datadir'], $_SERVER['PATH_INFO'])) { header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename='.basename($file)); header("Expires: " .date(DATE_RFC822,strtotime($CONFIG['cache']." seconds"))); diff --git a/type/Default.class.php b/type/Default.class.php index 42d5090..8632328 100644 --- a/type/Default.class.php +++ b/type/Default.class.php @@ -116,7 +116,7 @@ class Type_Default { function parse_filename($file) { if ($this->graph_type == 'canvas') { - $file = 'rrd' . str_replace($this->datadir, '', $file); + $file = 'rrd.php/' . str_replace($this->datadir . '/', '', $file); } return $this->rrd_escape($file); } -- cgit v1.1