]> git.ipfire.org Git - ipfire.org.git/commitdiff
Rewrite of the error pages of the main site for proper handling of the error codes.
authorms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sat, 3 Nov 2007 09:48:27 +0000 (09:48 +0000)
committerms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sat, 3 Nov 2007 09:48:27 +0000 (09:48 +0000)
Every 404 returned 200... Google doesn't like that.

git-svn-id: http://svn.ipfire.org/svn/ipfire/branches/www.ipfire.org/trunk@1048 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

14 files changed:
de/403.shtml [deleted file]
de/404.shtml [deleted file]
de/500.shtml [deleted file]
en/403.shtml [deleted file]
en/404.shtml [deleted file]
en/500.shtml [deleted file]
error/403.shtml [new file with mode: 0644]
error/404.shtml [new file with mode: 0644]
error/500.shtml [new file with mode: 0644]
header.shtml
images/error/403.png [new file with mode: 0644]
images/error/404.png [new file with mode: 0644]
images/error/500.png [new file with mode: 0644]
index.pl

diff --git a/de/403.shtml b/de/403.shtml
deleted file mode 100644 (file)
index 7a2d49c..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<!--#include virtual="../header.shtml" -->
-
-<div id="main">
-
-       <div id="main_inner" class="fixed">
-
-               <div id="primaryContent_columnless">
-
-                       <div id="columnA_columnless">
-               
-                               <h3>403 - Der Zugang zu dieser Webseite ist nicht gestattet</h3>
-
-                               <!-- insert image here -->
-
-                               <p>
-                                       Sie haben nicht die erforderliche Berechtigung um diesen Teil
-                                       der Webseite zu besuchen.
-                                       <br />
-                                       <a href="http://<!--#echo var="SERVER_NAME" -->/">Startseite</a>
-                                       <a href="javascript:history.go(-1)">Zurück</a>
-                               </p>
-                               
-                               <br class="clear" />
-               
-                       </div>
-       
-               </div>
-
-               <br class="clear" />
-
-       </div>
-
-</div>
-
-<!--#include virtual="../footer.shtml" -->
diff --git a/de/404.shtml b/de/404.shtml
deleted file mode 100644 (file)
index eacb562..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<!--#include virtual="../header.shtml" -->
-
-<div id="main">
-
-       <div id="main_inner" class="fixed">
-
-               <div id="primaryContent_columnless">
-
-                       <div id="columnA_columnless">
-               
-                               <h3>404 - Die angeforderte Webseite wurde nicht gefunden</h3>
-
-                               <!-- insert image here -->
-
-                               <p>
-                                       Die Webseite, die aufgerufen wurde, ist auf dem Server leider
-                                       nicht vorhanden.
-                                       <br />
-                                       <a href="http://<!--#echo var="SERVER_NAME" -->/">Startseite</a>
-                                       <a href="javascript:history.go(-1)">Zurück</a>
-                               </p>
-                               
-                               <br class="clear" />
-               
-                       </div>
-       
-               </div>
-
-               <br class="clear" />
-
-       </div>
-
-</div>
-
-<!--#include virtual="../footer.shtml" -->
diff --git a/de/500.shtml b/de/500.shtml
deleted file mode 100644 (file)
index 3f3ca42..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<!--#include virtual="../header.shtml" -->
-
-<div id="main">
-
-       <div id="main_inner" class="fixed">
-
-               <div id="primaryContent_columnless">
-
-                       <div id="columnA_columnless">
-               
-                               <h3>500 - Interner Serverfehler</h3>
-
-                               <!-- insert image here -->
-
-                               <p>
-                                       Beim Aufruf der Webseite ist auf dem Server ein interner Fehler
-                                       aufgetreten.<br />
-                                       Sollte sich dieser Umstand wiederholen, informieren Sie bitte die
-                                       Betreiber der Webseite.
-                                       <br />
-                                       <a href="http://<!--#echo var="SERVER_NAME" -->/">Startseite</a>
-                                       <a href="javascript:history.go(-1)">Zurück</a>
-                               </p>
-                               
-                               <br class="clear" />
-               
-                       </div>
-       
-               </div>
-
-               <br class="clear" />
-
-       </div>
-
-</div>
-
-<!--#include virtual="../footer.shtml" -->
diff --git a/en/403.shtml b/en/403.shtml
deleted file mode 100644 (file)
index 0d88801..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<!--#include virtual="../header.shtml" -->
-
-<div id="main">
-
-       <div id="main_inner" class="fixed">
-
-               <div id="primaryContent_columnless">
-
-                       <div id="columnA_columnless">
-               
-                               <h3>403 - Access to this site is denied</h3>
-
-                               <!-- insert image here -->
-
-                               <p>
-                                       You don't have the permission to visit this site.
-                                       <br />
-                                       <a href="http://<!--#echo var="SERVER_NAME" -->/">Home</a>
-                                       <a href="javascript:history.go(-1)">Back</a>
-                               </p>
-                               
-                               <br class="clear" />
-               
-                       </div>
-       
-               </div>
-
-               <br class="clear" />
-
-       </div>
-
-</div>
-
-<!--#include virtual="../footer.shtml" -->
diff --git a/en/404.shtml b/en/404.shtml
deleted file mode 100644 (file)
index 9bba4e7..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<!--#include virtual="../header.shtml" -->
-
-<div id="main">
-
-       <div id="main_inner" class="fixed">
-
-               <div id="primaryContent_columnless">
-
-                       <div id="columnA_columnless">
-               
-                               <h3>404 - Document not found</h3>
-
-                               <!-- insert image here -->
-
-                               <p>
-                                       The requested document was not found on the webserver.
-                                       <br />
-                                       <a href="http://<!--#echo var="SERVER_NAME" -->/">Home</a>
-                                       <a href="javascript:history.go(-1)">Back</a>
-                               </p>
-                               
-                               <br class="clear" />
-               
-                       </div>
-       
-               </div>
-
-               <br class="clear" />
-
-       </div>
-
-</div>
-
-<!--#include virtual="../footer.shtml" -->
diff --git a/en/500.shtml b/en/500.shtml
deleted file mode 100644 (file)
index a65d125..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<!--#include virtual="../header.shtml" -->
-
-<div id="main">
-
-       <div id="main_inner" class="fixed">
-
-               <div id="primaryContent_columnless">
-
-                       <div id="columnA_columnless">
-               
-                               <h3>500 - internal server error</h3>
-
-                               <!-- insert image here -->
-
-                               <p>
-                                       When you requested this website the server produced an internal
-                                       error.<br />
-                                       If this happens one more time, please send a mail to the developers.
-                                       <br />
-                                       <a href="http://<!--#echo var="SERVER_NAME" -->/">Home</a>
-                                       <a href="javascript:history.go(-1)">Back</a>
-                               </p>
-                               
-                               <br class="clear" />
-               
-                       </div>
-       
-               </div>
-
-               <br class="clear" />
-
-       </div>
-
-</div>
-
-<!--#include virtual="../footer.shtml" -->
diff --git a/error/403.shtml b/error/403.shtml
new file mode 100644 (file)
index 0000000..132a7b1
--- /dev/null
@@ -0,0 +1,52 @@
+<!--#include virtual="../header.shtml" -->
+
+<div id="main">
+
+       <div id="main_inner" class="fixed">
+
+               <div id="primaryContent_columnless">
+
+                       <div id="columnA_columnless">
+                       
+                               <!--#if expr="$HTTP_ACCEPT_LANGUAGE = /^de(.*)/" -->
+                       
+                                       <h3>403 - Der Zugang zu dieser Webseite ist nicht gestattet</h3>
+
+                                       <img class="floatTL" src="/images/error/403.png" alt="Forbidden" />
+       
+                                       <p>
+                                               Sie haben nicht die erforderliche Berechtigung um diesen Teil
+                                               der Webseite zu besuchen.
+                                               <br />
+                                               <a href="http://<!--#echo var="SERVER_NAME" -->/">Startseite</a>
+                                               <a href="javascript:history.go(-1)">Zurück</a>
+                                       </p>
+                                       
+                               <!--#else -->
+               
+                                       <h3>403 - Access to this site is denied</h3>
+       
+                                       <img class="floatTL" src="/images/error/403.png" alt="Forbidden" />
+       
+                                       <p>
+                                               You don't have the permission to visit this site.
+                                               <br />
+                                               <a href="http://<!--#echo var="SERVER_NAME" -->/">Home</a>
+                                               <a href="javascript:history.go(-1)">Back</a>
+                                       </p>
+                                       
+                               <!--#endif -->
+                               
+                               <br class="clear" />
+               
+                       </div>
+       
+               </div>
+
+               <br class="clear" />
+
+       </div>
+
+</div>
+
+<!--#include virtual="../footer.shtml" -->
diff --git a/error/404.shtml b/error/404.shtml
new file mode 100644 (file)
index 0000000..eee6dde
--- /dev/null
@@ -0,0 +1,52 @@
+<!--#include virtual="../header.shtml" -->
+
+<div id="main">
+
+       <div id="main_inner" class="fixed">
+
+               <div id="primaryContent_columnless">
+
+                       <div id="columnA_columnless">
+                       
+                               <!--#if expr="$HTTP_ACCEPT_LANGUAGE = /^de(.*)/" -->
+                                       
+                                       <h3>404 - Die angeforderte Webseite wurde nicht gefunden</h3>
+       
+                                       <img class="floatTL" src="/images/error/404.png" alt="Not found" />
+       
+                                       <p>
+                                               Die Webseite, die aufgerufen wurde, ist auf dem Server leider
+                                               nicht vorhanden.
+                                               <br />
+                                               <a href="http://<!--#echo var="SERVER_NAME" -->/">Startseite</a>
+                                               <a href="javascript:history.go(-1)">Zurück</a>
+                                       </p>
+                               
+                               <!--#else -->
+               
+                                       <h3>404 - Document not found</h3>
+       
+                                       <img class="floatTL" src="/images/error/404.png" alt="Not found" />
+       
+                                       <p>
+                                               The requested document was not found on the webserver.
+                                               <br />
+                                               <a href="http://<!--#echo var="SERVER_NAME" -->/">Home</a>
+                                               <a href="javascript:history.go(-1)">Back</a>
+                                       </p>
+                               
+                               <!--#endif -->
+                               
+                               <br class="clear" />
+               
+                       </div>
+       
+               </div>
+
+               <br class="clear" />
+
+       </div>
+
+</div>
+
+<!--#include virtual="../footer.shtml" -->
diff --git a/error/500.shtml b/error/500.shtml
new file mode 100644 (file)
index 0000000..bca18c2
--- /dev/null
@@ -0,0 +1,56 @@
+<!--#include virtual="../header.shtml" -->
+
+<div id="main">
+
+       <div id="main_inner" class="fixed">
+
+               <div id="primaryContent_columnless">
+
+                       <div id="columnA_columnless">
+               
+                               <!--#if expr="$HTTP_ACCEPT_LANGUAGE = /^de(.*)/" -->
+                               
+                                       <h3>500 - Interner Serverfehler</h3>
+       
+                                       <img class="floatTL" src="/images/error/500.png" alt="Server Error" />
+       
+                                       <p>
+                                               Beim Aufruf der Webseite ist auf dem Server ein interner Fehler
+                                               aufgetreten.<br />
+                                               Sollte sich dieser Umstand wiederholen, informieren Sie bitte die
+                                               Betreiber der Webseite.
+                                               <br />
+                                               <a href="http://<!--#echo var="SERVER_NAME" -->/">Startseite</a>
+                                               <a href="javascript:history.go(-1)">Zurück</a>
+                                       </p>
+                       
+                               <!--#else -->
+               
+                                       <h3>500 - internal server error</h3>
+       
+                                       <img class="floatTL" src="/images/error/500.png" alt="Server Error" />
+       
+                                       <p>
+                                               When you requested this website the server produced an internal
+                                               error.<br />
+                                               If this happens one more time, please send a mail to the developers.
+                                               <br />
+                                               <a href="http://<!--#echo var="SERVER_NAME" -->/">Home</a>
+                                               <a href="javascript:history.go(-1)">Back</a>
+                                       </p>
+                               
+                               <!--#endif -->
+                               
+                               <br class="clear" />
+               
+                       </div>
+       
+               </div>
+
+               <br class="clear" />
+
+       </div>
+
+</div>
+
+<!--#include virtual="../footer.shtml" -->
index eaa4ec7371e8565684a4d9005b5f8d488ced9e8b..41011ca9f566740851219b3714e25132abfbedb7 100644 (file)
@@ -21,6 +21,7 @@
                        <h2>Security for Future</h2>
                </div>
                
+               <!--#if expr="$REQUEST_URI != /^\/error/" -->
                <div id="lang">
                        <a href="/en/<!--#echo var="DOCUMENT_NAME" -->" ><img src="/images/en.gif" alt="english" /></a>
                        <a href="/de/<!--#echo var="DOCUMENT_NAME" -->" ><img src="/images/de.gif" alt="german" /></a>
@@ -39,6 +40,7 @@
                                <li><a href="imprint.shtml">Imprint</a></li>
                        </ul>
                </div>
+               <!--#endif -->
                
        </div>
 </div>
diff --git a/images/error/403.png b/images/error/403.png
new file mode 100644 (file)
index 0000000..f84c89a
Binary files /dev/null and b/images/error/403.png differ
diff --git a/images/error/404.png b/images/error/404.png
new file mode 100644 (file)
index 0000000..3cc3cd2
Binary files /dev/null and b/images/error/404.png differ
diff --git a/images/error/500.png b/images/error/500.png
new file mode 100644 (file)
index 0000000..66e118d
Binary files /dev/null and b/images/error/500.png differ
index cf2d0f5753067ff9d68afe81bc6416d622b3fa70..22ab6abd8d4c40decf530f26ce0d91171195a9c4 100755 (executable)
--- a/index.pl
+++ b/index.pl
@@ -8,21 +8,13 @@ if ($ENV{'HTTP_ACCEPT_LANGUAGE'} =~ /^de(.*)/) {
        $lang = "de";
 }
 
-if($ENV{'REQUEST_METHOD'} eq 'GET') {
-  @error = split(/=/, "$ENV{'QUERY_STRING'}");
-}
-
 print "Status: 302 Moved\n";
 print "Pragma: no-cache\n";
 
-if ($error[1]) {
-       print "Location: /$lang/$error[1].shtml\n";
+if ($ENV{'SERVER_NAME'} eq "source.ipfire.org") {
+       print "Location: /$lang/source.shtml\n";
 } else {
-       if ($ENV{'SERVER_NAME'} eq "source.ipfire.org") {
-               print "Location: /$lang/source.shtml\n";
-       } else {
-               print "Location: /$lang/index.shtml\n";
-       }
+       print "Location: /$lang/index.shtml\n";
 }
 
 # End http header...