]> git.mjollnir.org Git - moodle.git/commitdiff
MOved/cleaned fixpix.php to pix/redirect.php
authormoodler <moodler>
Tue, 11 Apr 2006 07:53:59 +0000 (07:53 +0000)
committermoodler <moodler>
Tue, 11 Apr 2006 07:53:59 +0000 (07:53 +0000)
pix/redirect.php [moved from fixpix.php with 73% similarity]

similarity index 73%
rename from fixpix.php
rename to pix/redirect.php
index 01fd7d3a29426174bf4b35b4daf040ac0bff6d8d..80b7badeef001196d298ea1fb52ef344047fbce7 100644 (file)
@@ -1,17 +1,17 @@
-<?php
+<?php // $Id$
 
 /**
 If you're using custompix in your theme, but you don't want to have to copy every pix from /pix into /theme/yourtheme/pix, use this as a 404 handler.
 You need to put a snippet like the following into your apacheconfig:
 
 <Location /moodle/theme/yourtheme/pix >
-   ErrorDocument 404 /moodle/fixpix.php
+   ErrorDocument 404 /moodle/pix/redirect.php
 </Location>
 
 **/
 
 
-require_once('config.php');
+require_once('../config.php');
 
 // obtain the requested path.
 if (!array_key_exists('REDIRECT_STATUS',$_SERVER) || $_SERVER['REDIRECT_STATUS'] != 404) {
@@ -28,12 +28,13 @@ if (file_exists($CFG->dirroot.'/pix/'.$matches[1])) {
     header("Location: ".$CFG->wwwroot.'/pix/'.$matches[1]);
 }
 
-?><html>
+?>
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
-<HTML><HEAD>
-<TITLE>404 Not Found</TITLE>
-</HEAD><BODY>
-<H1>Not Found</H1>
-<P><?php echo $_SERVER['REDIRECT_ERROR_NOTES']; ?></P>
-<HR>
-</BODY></HTML>
\ No newline at end of file
+<html><head>
+<title>404 Not Found</title>
+</head>
+<body>
+<h1>Picture not found</h1>
+<p><?php echo $_SERVER['REDIRECT_ERROR_NOTES']; ?></p>
+</body>
+</html>