aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2011-05-07 23:56:52 -0400
committerJason A. Donenfeld <Jason@zx2c4.com>2011-05-07 23:56:52 -0400
commit5a4c6c5422dfda4bfd5d93a51550739356feef61 (patch)
treecd59011dbe60903e720b8be5b46b5b2a9af7b979 /web
parentTrack google analytics. (diff)
downloadPhotoFloat-5a4c6c5422dfda4bfd5d93a51550739356feef61.tar.xz
PhotoFloat-5a4c6c5422dfda4bfd5d93a51550739356feef61.zip
Also account for images.
Diffstat (limited to 'web')
-rw-r--r--web/redirect.php3
1 files changed, 3 insertions, 0 deletions
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();