From 5a4c6c5422dfda4bfd5d93a51550739356feef61 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sat, 7 May 2011 23:56:52 -0400 Subject: [PATCH] Also account for images. --- web/redirect.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/redirect.php b/web/redirect.php index 06a2561..83b6fcc 100644 --- a/web/redirect.php +++ b/web/redirect.php @@ -23,6 +23,9 @@ if (strpos(strtolower($url), ".php") == strlen($url) - 4) { $url = substr($url, 0, strlen($url) - 4); $index = strrpos($url, "/"); $redirect = "/#".cachePath(substr($url, 0, $index))."/".cachePath(substr($url, $index)); +} else if (strpos(strtolower($url), ".jpg") == strlen($url) - 4) { + $index = strrpos($url, "/"); + $redirect = "/#".cachePath(substr($url, 0, $index))."/".cachePath(substr($url, $index)); } else if (strpos($url, "/cache/") === 0 || strpos($url, "/albums/") === 0 || strpos($url, "/img/") === 0 || strpos($url, "/img/") === 0 || strpos($url, "/js/") === 0 || strpos($url, "/css/") === 0) { header("HTTP/1.1 404 Not Found"); exit();