#!/usr/bin/perl

use strict;
use CGI;


my $DEBUG = 0;
my $base_dir;
my $script_dir;


my $cgi_obj = new CGI;

my ($go, $ordner);
$go = "";
if ( defined($cgi_obj->param('go')) ){
  $go = $cgi_obj->param('go');
}
$ordner = "";
if ( defined($cgi_obj->param('ordner')) ){
  $ordner = $cgi_obj->param('ordner');
}


$script_dir = "";
$base_dir = rindex ($0, "\\") ;
$base_dir = rindex ($0, "/") if ($base_dir < 0) ;
$script_dir = substr( $0, 0, $base_dir) . "/" if ($base_dir >= 0 ) ;
chdir($script_dir) ;
my $BasisPfad = $ENV{'SCRIPT_FILENAME'};



print "Content-type:text/html\n\n" if ( $DEBUG == 1);

print "\$go =$go <br>\n" if ( $DEBUG == 1);
print "\$ordner =$ordner <br>\n" if ( $DEBUG == 1);
print "\$base_dir =$base_dir <br>\n" if ( $DEBUG == 1);
print "\$script_dir =$script_dir <br>\n" if ( $DEBUG == 1);
print "\$BasisPfad =$BasisPfad <br>\n" if ( $DEBUG == 1);

my $ziel ="http://www.filmkritik.biz/$ordner/$go";
print "Status: 301 Permanently moved\n";
print "location: $ziel\n\n";