For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > July 2004 > cvs: livedocs / error.php









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: livedocs / error.php
Ilia Alshanetsky

2004-07-30, 3:56 pm

iliaa Fri Jul 30 11:26:40 2004 EDT

Modified files:
/livedocs error.php
Log:
Explicitly specify index.php, so redirects & links work for setups
where index.php is not a directory index.


http://cvs.php.net/diff.php/livedoc...13&r2=1.14&ty=u
Index: livedocs/error.php
diff -u livedocs/error.php:1.13 livedocs/error.php:1.14
--- livedocs/error.php:1.13 Mon May 24 16:03:22 2004
+++ livedocs/error.php Fri Jul 30 11:26:40 2004
@@ -18,7 +18,7 @@
// | Handles the 404 error and try to redirect to the good place. |
// +----------------------------------------------------------------------+
//
-// $Id: error.php,v 1.13 2004/05/24 20:03:22 iliaa Exp $
+// $Id: error.php,v 1.14 2004/07/30 15:26:40 iliaa Exp $

/* handle IIS style 404 handler */
if (strncmp($_SERVER['SERVER_SOFTWARE'], "Microsoft", 9) == 0 &&
@@ -106,7 +106,7 @@
$languages = explode(' ', LANGUAGES);

if (count($languages) == 1) {
- $link = FORCE_DYNAMIC ? "?l=$languages[0]&q=manual" : "$languages[0]/manual.html";
+ $link = FORCE_DYNAMIC ? "index.php?l=$languages[0]&q=manual" : "$languages[0]/manual.html";
die(header('Location: http://' . $_SERVER['HTTP_HOST'] . WEBBASE . $link));
}

@@ -115,7 +115,7 @@
echo 'Choose a language:';
echo '<ul>';
foreach ($languages as $language) {
- $link = FORCE_DYNAMIC ? "?l=$language&q=manual" : "$language/manual.html";
+ $link = FORCE_DYNAMIC ? "index.php?l=$language&q=manual" : "$language/manual.html";
echo '<li><a href="' . WEBBASE . $link . '">' . $langs[$language] . '</a></li>';
}
echo '</ul>';
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com