"Die Seite konnte nicht angezeigt werden" Meldung erhalte ich nur
Vielleicht Jemand eine Idee?
Code: Alles auswählen
<?php
$SiteNameURL = $_SERVER['HTTP_HOST'];
switch (strtolower($SiteNameURL)) {
case "http://www.woy.ch": //MUST BE LOWER CASE
/*
if(isset($_COOKIE['Sprache'])) {
header ("location: ".$_COOKIE['Sprache']);
}break;
*/
header("HTTP/1.1 301 Moved Permanently");
header ('location:http://de.woy.ch');die();
break;
case "www.woy.ch": //MUST BE LOWER CASE
/*
if(isset($_COOKIE['Sprache'])) {
header ("location: ".$_COOKIE['Sprache']);
}break;
*/
header("HTTP/1.1 301 Moved Permanently");
header ('location:http://de.woy.ch');die();
break;
case "woy.ch": //MUST BE LOWER CASE
/*
if(isset($_COOKIE['Sprache'])) {
header ("location: ".$_COOKIE['Sprache']);
}break;
*/ header("HTTP/1.1 301 Moved Permanently");
header ('location:http://de.woy.ch');die();
break;
}
if(!isset($_COOKIE['Sprache']))
{
$sprache = $_SERVER["HTTP_ACCEPT_LANGUAGE"];
$sprache = explode (',',$sprache);
switch($sprache[0]) {
case 'de-DE':
if (stristr($sprache[0],'US')){
$weiterleitung = 'http://en.woy.ch';break;
}
if (stristr($sprache[0],'ES')){
$weiterleitung = 'http://es.woy.ch';break;
}
$weiterleitung = 'http://de.woy.ch';break;
case 'en-US':
if (stristr($sprache[0],'DE')){
$weiterleitung = 'http://de.woy.ch';break;
}
if (stristr($sprache[0],'ES')){
$weiterleitung = 'http://es.woy.ch';break;
}
$weiterleitung = 'http://en.woy.ch';break;
case 'es-ES':
if (stristr($sprache[0],'DE')){
$weiterleitung = 'http://de.woy.ch';break;
}
if (stristr($sprache[0],'EN')){
$weiterleitung = 'http://en.woy.ch';break;
}
$weiterleitung = 'http://es.woy.ch';break;
}
setcookie("Sprache", $weiterleitung);
header("HTTP/1.1 301 Moved Permanently");
header ('location:'.$weiterleitung);die();
}
if (defined('E_DEPRECATED')) {
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
} else {
error_reporting(E_ALL ^ E_NOTICE);
}
// ******************
// Constants defined
// ******************
define('PATH_thisScript',str_replace('//','/', str_replace('\\','/', (PHP_SAPI=='cgi'||PHP_SAPI=='isapi' ||PHP_SAPI=='cgi-fcgi')&&($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED'])? ($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED']):($_SERVER['ORIG_SCRIPT_FILENAME']?$_SERVER['ORIG_SCRIPT_FILENAME']:$_SERVER['SCRIPT_FILENAME']))));
define('PATH_site', dirname(PATH_thisScript).'/');
if (@is_dir(PATH_site.'typo3/sysext/cms/tslib/')) {
define('PATH_tslib', PATH_site.'typo3/sysext/cms/tslib/');
} elseif (@is_dir(PATH_site.'tslib/')) {
define('PATH_tslib', PATH_site.'tslib/');
} else {
// define path to tslib/ here:
$configured_tslib_path = 'htdocs/woy.ch/typo3/sysext/cms/tslib/';
// example:
// $configured_tslib_path = '/var/www/mysite/typo3/sysext/cms/tslib/';
define('PATH_tslib', $configured_tslib_path);
}
if (PATH_tslib=='') {
die('Cannot find tslib/. Please set path by defining $configured_tslib_path in '.basename(PATH_thisScript).'.');
}
// ******************
// include TSFE
// ******************
require (PATH_tslib.'index_ts.php');
?>
Die Header Infos sind folgende:
https://woy.ch/
GET / HTTP/1.1
Host: woy.ch
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.8,de-de;q=0.7,de;q=0.5,en-us;q=0.3,en;q=0.2
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Cookie: Sprache=http%3A%2F%2Fen.woy.ch; fe_typo_user=bf44a06a78fccb1bc7783ef1ad280809; be_typo_user=d88c8fdbe2ae3481223a2e568958b4ed; PHPSESSID=61faf9a88ad7c4826ecd472c4a21793b
HTTP/1.1 301 Moved Permanently
Date: Fri, 21 May 2010 10:18:11 GMT
Server: Apache
X-Powered-By: PHP/5.2.12
Location: https://de.woy.ch
Content-Length: 0
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html
----------------------------------------------------------
https://de.woy.ch/
GET / HTTP/1.1
Host: de.woy.ch
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.8,de-de;q=0.7,de;q=0.5,en-us;q=0.3,en;q=0.2
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Cookie: Sprache=http%3A%2F%2Fen.woy.ch; fe_typo_user=57120a4e9e1221a2ece43a613c423586; PHPSESSID=3dc0ed1dfce46c6de008241b7cecb143
HTTP/1.1 200 OK
Date: Fri, 21 May 2010 10:18:11 GMT
Server: Apache
X-Powered-By: PHP/5.2.12
Set-Cookie: fe_typo_user=f6f68abc8f5e97ebe95c413ee0534e98; path=/
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1