Verfasst: Fr 12. Mai 2006, 08:14
ok die lösung ist nicht schlecht - ist dann auch sichergestellt, dass es immer noch funktioniert, wenn kein www. mehr vor der domain eingegeben wird?
Das Diskussionsforum zum Open Source Content Management System
https://forum.contenido.org/
Code: Alles auswählen
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R=301]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*).html$ %{HTTP_HOST}/front_content.php?parts[]=$1&parts[]=$2&parts[]=$3&parts[]=$4&parts[]=$5&parts[]=$6&parts[]=$7&parts[]=$8&artname=$9 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ %{HTTP_HOST}/front_content.php?parts[]=$1&parts[]=$2&parts[]=$3&parts[]=$4&parts[]=$5&parts[]=$6&parts[]=$7&parts[]=$8 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*).html$ %{HTTP_HOST}/front_content.php?parts[]=$1&parts[]=$2&parts[]=$3&parts[]=$4&parts[]=$5&parts[]=$6&parts[]=$7&artname=$8 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ %{HTTP_HOST}/front_content.php?parts[]=$1&parts[]=$2&parts[]=$3&parts[]=$4&parts[]=$5&parts[]=$6&parts[]=$7 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*).html$ %{HTTP_HOST}/front_content.php?parts[]=$1&parts[]=$2&parts[]=$3&parts[]=$4&parts[]=$5&parts[]=$6&artname=$7 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ %{HTTP_HOST}/front_content.php?parts[]=$1&parts[]=$2&parts[]=$3&parts[]=$4&parts[]=$5&parts[]=$6 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*).html$ %{HTTP_HOST}/front_content.php?parts[]=$1&parts[]=$2&parts[]=$3&parts[]=$4&parts[]=$5&artname=$6 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ %{HTTP_HOST}/front_content.php?parts[]=$1&parts[]=$2&parts[]=$3&parts[]=$4&parts[]=$5 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*).html$ %{HTTP_HOST}/front_content.php?parts[]=$1&parts[]=$2&parts[]=$3&parts[]=$4&artname=$5 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ %{HTTP_HOST}/front_content.php?parts[]=$1&parts[]=$2&parts[]=$3&parts[]=$4 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/(.*).html$ %{HTTP_HOST}/front_content.php?parts[]=$1&parts[]=$2&parts[]=$3&artname=$4 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/$ %{HTTP_HOST}/front_content.php?parts[]=$1&parts[]=$2&parts[]=$3 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/(.*).html$ %{HTTP_HOST}/front_content.php?parts[]=$1&parts[]=$2&artname=$3 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/$ %{HTTP_HOST}/front_content.php?parts[]=$1&parts[]=$2 [QSA,L]
RewriteRule ^([^/]+)/(.*).html$ %{HTTP_HOST}/front_content.php?parts[]=$1&artname=$2 [QSA,L]
RewriteRule ^([^/]+)/$ %{HTTP_HOST}/front_content.php?parts[]=$1 [QSA,L]
RewriteRule ^(.*).html$ %{HTTP_HOST}/front_content.php?artname=$1 [QSA,L]
RewriteRule ^$ %{HTTP_HOST}/front_content.php [QSA,L]
</IfModule>
Nach Aufruf von domain.de/index.php kommt Meldung:Typ: "ModRewrite"
Name: Der zu Überschreibende Key aus der config.php, z.B.:
"use_lowercase_uri"
Wert: der zu Überschreibende Wert z.B. "1"
Code: Alles auswählen
Warning: Cannot modify header information - headers already sent by (output started at /serverpfad_usw/contenido/includes/config.php:1) in /serverpfad_usw/index.php on line 14Code: Alles auswählen
Warning: Cannot modify header information - headers already sent by (output started at /serverpfad_usw/contenido/includes/config.php:1) in /serverpfad_usw/conlib/session.inc on line 479
Warning: Cannot modify header information - headers already sent by (output started at /serverpfad_usw/contenido/includes/config.php:1) in /serverpfad_usw/conlib/session.inc on line 484
Warning: Cannot modify header information - headers already sent by (output started at /serverpfad_usw/contenido/includes/config.php:1) in /serverpfad_usw/conlib/session.inc on line 485
Warning: Cannot modify header information - headers already sent by (output started at /serverpfad_usw/contenido/includes/config.php:1) in /serverpfad_usw/conlib/session.inc on line 486
Warning: Cannot modify header information - headers already sent by (output started at /serverpfad_usw/contenido/includes/config.php:1) in /serverpfad_usw/conlib/session.inc on line 487
Warning: Cannot modify header information - headers already sent by (output started at /serverpfad_usw/contenido/includes/config.php:1) in /serverpfad_usw/conlib/session.inc on line 488
Warning: Cannot modify header information - headers already sent by (output started at /serverpfad_usw/contenido/includes/config.php:1) in /serverpfad_usw/conlib/session.inc on line 489
Warning: Cannot modify header information - headers already sent by (output started at /serverpfad_usw/contenido/includes/config.php:1) in /serverpfad_usw/cms/front_content.php on line 201Code: Alles auswählen
$cfg['mod_rewrite']['use'] = 1;Code: Alles auswählen
RewriteBase /hotel... hab ich gemacht, - hat keinerlei Wirkung. Es wird nach wie vor die Adresse als "...front_content.php?idcat=80" angezeigt. - keine Änderungkopiere bitte einmal die komplette modrewrite sektion aus contenido/includes/config.php in die hotel/config.php
Code: Alles auswählen
login-hinweis.html?ref_idart=107&ref_file=2006/03/18.06.pdf&failed_login_attempts=0
Code: Alles auswählen
$_GET['amp;ref_file] bzw. $_REQUEST['amp;ref_file']
Code: Alles auswählen
$str_errsite = 'front_content.php?idart=' . $err_idart . '&ref_idart=' . $ref_idart . '&ref_file=' . $ref_file . '&failed_login_attempts=' . $failed_login_attempts;
if ($cfg['mod_rewrite']['use'] == 1) {
cInclude("classes","class.modrewrite.php");
if (preg_match('/^front_content\.php(.*|.+?)/i', $str_errsite, $arr_hits ) == 1) {
$str_errsite = ModRewrite::build_new_url($arr_hits[1]);
}
}
$errsite = 'Location: ' . $str_errsite;
header($errsite);
Code: Alles auswählen
if ( count ( $arr_additional_params ) > 0 ) {
$str_additional_params = '?' . join ( "&", $arr_additional_params );
}
Code: Alles auswählen
if ( count ( $arr_additional_params ) > 0 ) {
$str_additional_params = '?' . join ( "&", $arr_additional_params );
}