jetzt frag mich nicht wie das da hinkommt (vermute mal auf nen älteren Mod). Aber in der alten overall_header funzt das alles so perfekt. Nur wenn ich den Code einfüge kommt die Fehlermeldung.
Nur um sicher zu sein ich muss ja das
Code: Alles auswählen
//
// Short URL implementation
//
// start buffering
ob_start();
function replace_for_mod_rewrite(&$s) {
// get the correct base_url: protocoll,url,path to make sure to rewrite only internal links
if (empty($HTTP_SERVER_VARS['HTTP_HOST'])) {
$server = getenv('HTTP_HOST');
} else {
$server = $HTTP_SERVER_VARS['HTTP_HOST'];
}
// IIS sets HTTPS=off
if (isset($HTTP_SERVER_VARS['HTTPS']) && $HTTP_SERVER_VARS['HTTPS'] != 'off') {
$proto = 'https://';
} else {
$proto = 'http://';
}
// Get the name of this URI
// Start of with REQUEST_URI
if (isset($HTTP_SERVER_VARS['REQUEST_URI'])) {
$path = $HTTP_SERVER_VARS['REQUEST_URI'];
} else {
$path = getenv('REQUEST_URI');
}
if ((empty($path)) || (substr($path, -1, 1) == '/')) {
// REQUEST_URI was empty or pointed to a path
// Try looking at PATH_INFO
$path = getenv('PATH_INFO');
if (empty($path)) {
// No luck there either
// Try SCRIPT_NAME
if (isset($HTTP_SERVER_VARS['SCRIPT_NAME'])) {
$path = $HTTP_SERVER_VARS['SCRIPT_NAME'];
} else {
$path = getenv('SCRIPT_NAME');
}
}
}
$path = preg_replace('/[#\?].*/', '', $path);
$path = dirname($path);
if (preg_match('!^[/\\\]*$!', $path)) {
$path = '';
}
$base_url = "$proto$server$path/";
$prefix = '|"(?:'.$base_url.')?';
// now that we know about the correct $prefix we can start the rewriting
$urlin =
array(
$prefix . '(?<!/)index.php"|',
$prefix . '(?<!/)viewforum.php\?f=([0-9]*)&(?:amp;)topicdays=([0-9]*)&(?:amp;)start=([0-9]*)"|',
$prefix . '(?<!/)viewforum.php\?f=([0-9]*)"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)view=previous"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)view=next"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)postdays=([0-9]*)&(?:amp;)postorder=([a-zA-Z]*)&(?:amp;)start=([0-9]*)"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)start=([0-9]*)&(?:amp;)postdays=([0-9]*)&(?:amp;)postorder=([a-zA-Z]*)&(?:amp;)highlight=([a-zA-Z0-9]*)"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)start=([0-9]*)"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)"|',
);
$urlout = array(
'"forums.html"',
'"viewforum\\1-\\2-\\3.html"',
'"forum\\1.html"',
'"ptopic\\1.html"',
'"ntopic\\1.html"',
'"ftopic\\1-\\2-\\3-\\4.html"',
'"ftopic\\1.html"',
'"ftopic\\1-\\2.html"',
'"ftopic\\1.html"',
);
$s = preg_replace($urlin, $urlout, $s);
return $s;
}
durch das
Code: Alles auswählen
//
// start Short URL implementation [larsneo]
//
// start buffering
ob_start();
function replace_for_mod_rewrite(&$s) {
// get the correct base_url: protocoll,url,path to make sure to rewrite only internal links
if (empty($HTTP_SERVER_VARS['HTTP_HOST'])) {
$server = getenv('HTTP_HOST');
} else {
$server = $HTTP_SERVER_VARS['HTTP_HOST'];
}
// IIS sets HTTPS=off
if (isset($HTTP_SERVER_VARS['HTTPS']) && $HTTP_SERVER_VARS['HTTPS'] != 'off') {
$proto = 'https://';
} else {
$proto = 'http://';
}
// Get the name of this URI
// Start of with REQUEST_URI
if (isset($HTTP_SERVER_VARS['REQUEST_URI'])) {
$path = $HTTP_SERVER_VARS['REQUEST_URI'];
} else {
$path = getenv('REQUEST_URI');
}
if ((empty($path)) || (substr($path, -1, 1) == '/')) {
// REQUEST_URI was empty or pointed to a path
// Try looking at PATH_INFO
$path = getenv('PATH_INFO');
if (empty($path)) {
// No luck there either
// Try SCRIPT_NAME
if (isset($HTTP_SERVER_VARS['SCRIPT_NAME'])) {
$path = $HTTP_SERVER_VARS['SCRIPT_NAME'];
} else {
$path = getenv('SCRIPT_NAME');
}
}
}
$path = preg_replace('/[#\?].*/', '', $path);
$path = dirname($path);
if (preg_match('!^[/\\\]*$!', $path)) {
$path = '';
}
$base_url = "$proto$server$path/";
$prefix = '|"(?:'.$base_url.')?';
// now that we know about the correct $prefix we can start the rewriting
$urlin =
array(
$prefix . '(?<!/)index.php\?mark=forums"|',
$prefix . '(?<!/)index.php"|',
$prefix . '(?<!/)index.php\?c=([0-9]*)"|',
$prefix . '(?<!/)viewforum.php\?f=([0-9]*)&(?:amp;)topicdays=0&(?:amp;)start=0"|',
$prefix . '(?<!/)viewforum.php\?f=([0-9]*)&(?:amp;)topicdays=0&(?:amp;)start=([0-9]*)"|',
$prefix . '(?<!/)viewforum.php\?f=([0-9]*)&(?:amp;)topicdays=([0-9]*)&(?:amp;)start=([0-9]*)"|',
$prefix . '(?<!/)viewforum.php\?f=([0-9]*)&(?:amp;)mark=topics"|',
$prefix . '(?<!/)viewforum.php\?f=([0-9]*)"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)highlight="|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)view=previous"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)view=next"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)start=([0-9]*)&(?:amp;)postdays=([0-9]*)&(?:amp;)postorder=([a-zA-Z]*)&(?:amp;)highlight=([a-zA-Z0-9]*)"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)postdays=0&(?:amp;)postorder=asc&(?:amp;)start=0"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)postdays=0&(?:amp;)postorder=asc&(?:amp;)start=([0-9]*)"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)postdays=([0-9]*)&(?:amp;)postorder=([a-zA-Z]*)&(?:amp;)start=([0-9]*)"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)start=0"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)start=([0-9]*)"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)"|',
$prefix . '(?<!/)viewtopic.php\?p=([0-9]*)&(?:amp;)highlight=#([0-9]*)"|',
$prefix . '(?<!/)viewtopic.php\?p=([0-9]*)#([0-9]*)"|',
$prefix . '(?<!/)posting.php\?mode=newtopic&(?:amp;)f=([0-9]*)"|',
$prefix . '(?<!/)posting.php\?mode=reply&(?:amp;)t=([0-9]*)"|',
$prefix . '(?<!/)posting.php\?mode=([a-z]*)&(?:amp;)p=([0-9]*)"|',
$prefix . '(?<!/)album.php"|',
$prefix . '(?<!/)album_personal_index.php"|',
$prefix . '(?<!/)album_personal.php\?user_id=([0-9]*)"|',
$prefix . '(?<!/)profile.php\?mode=viewprofile&(?:amp;)u=([0-9]*)"|',
$prefix . '(?<!/)search.php\?search_author=([[:alnum:]%+\.]+)"|',
$prefix . '(?<!/)search.php\?search_id=([0-9]*)&(?:amp;)start=([0-9]*)"|',
$prefix . '(?<!/)search.php\?search_id=([a-zA-Z]*)"|',
$prefix . '(?<!/)privmsg.php\?mode=([a-zA-Z]*)&(?:amp;)u=([0-9]*)"|',
$prefix . '(?<!/)privmsg.php\?folder=([a-zA-Z]*)"|',
$prefix . '(?<!/)profile.php\?mode=register&(?:amp;)agreed=true"|',
$prefix . '(?<!/)profile.php\?mode=([0-9a-zA-Z]*)"|',
$prefix . '(?<!/)map.php\?highlight=([0-9]*)"|',
$prefix . '(?<!/)map.php"|',
$prefix . '(?<!/)faq.php"|',
$prefix . '(?<!/)search.php"|',
$prefix . '(?<!/)memberlist.php"|',
$prefix . '(?<!/)groupcp.php"|',
$prefix . '(?<!/)report.php"|',
$prefix . '(?<!/)viewonline.php"|',
);
$urlout = array(
'"index-mark.html"',
'"index.html"',
'"category\\1.html"',
'"forum\\1.html"',
'"forum\\1-\\2.html"',
'"forum\\1-\\2-\\3.html"',
'"forum\\1-mark.html"',
'"forum\\1.html"',
'"ftopic\\1.html"',
'"ptopic\\1.html"',
'"ntopic\\1.html"',
'"ftopic\\1.html"',
'"ftopic\\1.html"',
'"ftopic\\1-\\2.html"',
'"ftopic\\1-\\2-\\3-\\4.html"',
'"ftopic\\1.html"',
'"ftopic\\1-\\2.html"',
'"ftopic\\1.html"',
'"fpost\\1.html#\\2"',
'"fpost\\1.html#\\2"',
'"post-newtopic-\\1.html"',
'"post-reply-\\1.html"',
'"post-\\1-\\2.html"',
'"album.html"',
'"palbum.html"',
'"palbum\\1.html"',
'"profile\\1.html"',
'"search-author-\\1.html"',
'"search-\\1-\\2.html"',
'"search-\\1.html"',
'"privmsg-\\1-\\2.html"',
'"privmsg-\\1.html"',
'"register.html"',
'"profile-\\1.html"',
'"map-\\1.html"',
'"map.html"',
'"faq.html"',
'"search.html"',
'"memberlist.html"',
'"groups.html"',
'"report.html"',
'"online.html"',
);
$s = preg_replace($urlin, $urlout, $s);
return $s;
}
//
// end Short URL implementation [larsneo]
//
ersetzen
*edit*
hmm heute scheint es mit der gleichen Datei, mit der ich diese Fehlermeldung hatte zu funzen.... da versteh einer die Welt
