Author: dom
Date: 2007-09-17 22:20:04 +0100 (Mon, 17 Sep 2007)
New Revision: 1120
Removed:
website-new/preview/index.cgi
website-new/preview/page
Modified:
website-new/preview/.htaccess
Log:
remove obvious cgi stuff
Modified: website-new/preview/.htaccess
===================================================================
--- website-new/preview/.htaccess 2007-09-17 21:12:09 UTC (rev 1119)
+++ website-new/preview/.htaccess 2007-09-17 21:20:04 UTC (rev 1120)
@@ -1,10 +0,0 @@
-Options +ExecCGI
-AddHandler cgi-script .cgi
-
-DirectoryIndex page
-
-<FilesMatch "^(page)$">
- SetHandler cgi-script
- Options +ExecCGI
-</FilesMatch>
-
Deleted: website-new/preview/index.cgi
===================================================================
--- website-new/preview/index.cgi 2007-09-17 21:12:09 UTC (rev 1119)
+++ website-new/preview/index.cgi 2007-09-17 21:20:04 UTC (rev 1120)
@@ -1,37 +0,0 @@
-#!/usr/bin/perl
-
-use warnings;
-use strict;
-
-my $url = "http://openguides.org/";
-my $env = '';
-
-if ($ENV{'QUERY_STRING'}) {
- $env = $ENV{'QUERY_STRING'};
- $env =~ s/page=//;
- $env = 'page/' . $env;
-}
-
-print <<HTML;
-Server Response:
http://openguides.org/index.cgi
-Status: HTTP/1.1 301 Moved Permanently
-Content-Type: text/html
-Location: $url$env
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Refresh" content="0; url=$url$env">
- <meta http-equiv="Status" content="HTTP/1.1 301 Moved
Permanently">
- <meta http-equiv="Location" content="$url$env">
- <meta http-equiv="Content-Type" content="text/html;
charset=utf-8">
- <title>301 Moved Permanently</title>
-</head>
-<body>
-<h1>301 Moved Permanently</h1>
-<p>
-This resource has moved to <a href="$url$env">$url$env</a>.
-</p>
-</body>
-</html>
-HTML
Deleted: website-new/preview/page
===================================================================
--- website-new/preview/page 2007-09-17 21:12:09 UTC (rev 1119)
+++ website-new/preview/page 2007-09-17 21:20:04 UTC (rev 1120)
@@ -1,62 +0,0 @@
-#!/usr/bin/perl
-
-use warnings;
-use strict;
-
-use Template;
-
-my $tt = Template->new({
- EVAL_PERL => 1,
- INCLUDE_PATH => 'templates',
- PRE_PROCESS => 'config',
- PRE_CHOMP => 1,
- POST_CHOMP => 1
- });
-
-my $page = $ENV{'REQUEST_URI'} || 'home';
-my $script = $ENV{'SCRIPT_NAME'};
-$page =~ s{^$script/}{};
-$page = 'home' if $page =~ m{\*|\?|/}; # elite security
-
-my $vars = { page => $page };
-
-print "Content-Type: text/html\n\n";
-
-$tt->process('wrapper', $vars) || error($tt->error);
-
-sub error {
- my $error = shift;
-
- print <<HTML;
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <title>Error</title>
-<style type="text/css">
-body {
- background: #fff;
- color: #000;
- margin: 10px;
- font: 1em Verdana, Arial, sans-serif
-}
-blockquote {
- background: #ccc;
- color: #000;
- border: 1px dotted #000;
- padding: 10px
-}
-</style>
-</head>
-<body>
-<h1>Error</h1>
-<p>
-Something has gone wrong. Here's what Template Toolkit had to say:
-</p>
-<blockquote>
-$error
-</blockquote>
-</body>
-</html>
-HTML
-
-}