Hallo zusammen!
Zunächst mal vielen Dank an stese für diese sehr nützliche Mod.
Ich stehe nun vor folgender Aufgabe:
Ich habe ein Contenido mit zwei Mandanten. Der Zugriff auf das Backend soll per SSL erfolgen.
Mandant 1: Verzeichnis /cms, erreichbar mit
http://www.kashban.de
Mandant 2: Verzeichnis /zwölfpluseins,
http://www.zwoelf-plus-eins.de
SSL-Zugriff auf Backend:
https://ssl.webpack.de/kashban.de/contenido/
Auf dem Webserver sieht das so aus: /www/cms, /www/zwoelfpluseins und /www/contenido. Das Verzeichnis www ist der root für
http://www.kashban.de.
Zum Mandanten /cms:
Ich habe nun das modrewrite exklusiv für den Mandanten /cms eingerichtet wie hier im Thread beschrieben. Die resultierende URL ist
http://www.kashban.de/cms. Die in der Navi generierten Links stimmen dann auch, jedoch lande ich bei jedem Klick wieder auf der Startseite.
Die .htaccess entspricht genau der im Mod, jedoch mit auskommentierter rewrite base:
Code: Alles auswählen
#AddHandler php-cgi .php .php4
<IfModule mod_rewrite.c>
RewriteEngine on
# achtung bitte basisverzeichnis anpassen!
# RewriteBase /cms
# ausnahmen fuer verzeichnisse der mod_rewrite regel:
# verzeichnisse ausschliessen
RewriteRule ^usage/.*$ - [L]
# das kann beliebig erweitert werden:
# RewriteRule ^verzeichnis1/.*$ - [L]
# RewriteRule ^verzeichnis2/.*$ - [L]
# RewriteRule ^verzeichnis3/.*$ - [L]
# RewriteRule ^verzeichnis4/.*$ - [L]
# dank an panti aus dem contenido-forum fuer
# rewrite rule ohne abschlieszenden slash in der url
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*).html$ front_content.php?parts[]=$1∂s[]=$2∂s[]=$3∂s[]=$4∂s[]=$5∂s[]=$6∂s[]=$7∂s[]=$8&artname=$9 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ front_content.php?parts[]=$1∂s[]=$2∂s[]=$3∂s[]=$4∂s[]=$5∂s[]=$6∂s[]=$7∂s[]=$8 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/\.]+)$ front_content.php?parts[]=$1∂s[]=$2∂s[]=$3∂s[]=$4∂s[]=$5∂s[]=$6∂s[]=$7∂s[]=$8 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*).html$ front_content.php?parts[]=$1∂s[]=$2∂s[]=$3∂s[]=$4∂s[]=$5∂s[]=$6∂s[]=$7&artname=$8 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ front_content.php?parts[]=$1∂s[]=$2∂s[]=$3∂s[]=$4∂s[]=$5∂s[]=$6∂s[]=$7 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/\.]+)$ front_content.php?parts[]=$1∂s[]=$2∂s[]=$3∂s[]=$4∂s[]=$5∂s[]=$6∂s[]=$7 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*).html$ front_content.php?parts[]=$1∂s[]=$2∂s[]=$3∂s[]=$4∂s[]=$5∂s[]=$6&artname=$7 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ front_content.php?parts[]=$1∂s[]=$2∂s[]=$3∂s[]=$4∂s[]=$5∂s[]=$6 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/\.]+)$ front_content.php?parts[]=$1∂s[]=$2∂s[]=$3∂s[]=$4∂s[]=$5∂s[]=$6 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*).html$ front_content.php?parts[]=$1∂s[]=$2∂s[]=$3∂s[]=$4∂s[]=$5&artname=$6 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ front_content.php?parts[]=$1∂s[]=$2∂s[]=$3∂s[]=$4∂s[]=$5 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/\.]+)$ front_content.php?parts[]=$1∂s[]=$2∂s[]=$3∂s[]=$4∂s[]=$5 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*).html$ front_content.php?parts[]=$1∂s[]=$2∂s[]=$3∂s[]=$4&artname=$5 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ front_content.php?parts[]=$1∂s[]=$2∂s[]=$3∂s[]=$4 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/\.]+)$ front_content.php?parts[]=$1∂s[]=$2∂s[]=$3∂s[]=$4 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/(.*).html$ front_content.php?parts[]=$1∂s[]=$2∂s[]=$3&artname=$4 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/$ front_content.php?parts[]=$1∂s[]=$2∂s[]=$3 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/([^/\.]+)$ front_content.php?parts[]=$1∂s[]=$2∂s[]=$3 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/(.*).html$ front_content.php?parts[]=$1∂s[]=$2&artname=$3 [QSA,L]
RewriteRule ^([^/]+)/([^/]+)/$ front_content.php?parts[]=$1∂s[]=$2 [QSA,L]
RewriteRule ^([^/]+)/([^/\.]+)$ front_content.php?parts[]=$1∂s[]=$2 [QSA,L]
RewriteRule ^([^/]+)/(.*).html$ front_content.php?parts[]=$1&artname=$2 [QSA,L]
RewriteRule ^([^/]+)/$ front_content.php?parts[]=$1 [QSA,L]
RewriteRule ^([^/\.]+)$ front_content.php?parts[]=$1 [QSA,L]
RewriteRule ^(.*).html$ front_content.php?artname=$1 [QSA,L]
RewriteRule ^$ front_content.php [QSA,L]
</IfModule>
Die Config.php des Mandanten:
Code: Alles auswählen
<?php
// Relative path to contenido directory, for all inclusions, in most cases: "../contenido/"
$contenido_path = "../contenido/";
// If language isn't specified, set this client and language (ID)
$load_lang = "1";
$load_client = "1";
/* Various debugging options */
$frontend_debug["container_display"] = false;
$frontend_debug["module_display"] = false;
$frontend_debug["module_timing"] = false;
$frontend_debug["module_timing_summary"] = false;
/* Set to 1 to brute-force module regeneration */
$force = 0;
/* Advanced ModRewrite settings
* ----------------------------
*
* global ModRewrite Settings.
*
* edit by stese - ModRewrite
*/
/* Use advanced mod_rewrites ( 1 = yes, 0 = none ) */
$cfg['mod_rewrite']['use'] = 1;
/* Path to the htaccessfile with trailling slash from domain-root! */
$cfg['mod_rewrite']['rootdir'] = '/cms/';
/* Start TreeLocation from Root Tree (set to 1) or get location from first category (set to 0) */
$cfg['mod_rewrite']['startfromroot'] = 0;
/* is multilanguage? ( 1 = yes, 0 = none ) */
$cfg['mod_rewrite']['use_language'] = 1;
/* use language name in url? ( 1 = yes, 0 = none ) */
$cfg['mod_rewrite']['use_language_name'] = 1;
/* is multiclient in only one directory? ( 1 = yes, 0 = none ) */
$cfg['mod_rewrite']['use_client'] = 0;
/* use client name in url? ( 1 = yes, 0 = none ) */
$cfg['mod_rewrite']['use_client_name'] = 0;
/* use lowercase url? ( 1 = yes, 0 = none ) */
$cfg["mod_rewrite"]['use_lowercase_uri'] = 1;
/* file extension for article links */
$cfg["mod_rewrite"]['file_extension'] = '.html';
/* The percentage if the category name have to match with database names. */
$cfg["mod_rewrite"]['category_resolve_min_percentage'] = '75';
/*
following three settings write urls like this one:
www.domain.de/category1-category2.articlename.html
changes of these settings causes a reset of all aliases
by using following code snippet in a module once:
<?php
cInclude('classes','../contenido/classes/class.modrewrite.php');
ModRewrite::reset_aliases();
?>
/* use categories as html file part? ( 1 = yes, 0 = none ) */
$cfg["mod_rewrite"]['use_categories_as_html_file'] = 0;
/* seperator for categories */
$cfg["mod_rewrite"]['category_seperator'] = '-';
/* seperator between category and article */
$cfg["mod_rewrite"]['article_seperator'] = '.';
/* word seperator in category names */
$cfg["mod_rewrite"]['category_word_seperator'] = '_';
/* word seperator in article names */
$cfg["mod_rewrite"]['article_word_seperator'] = '-';
?>
Die reseturl-Funktion habe ich schon laufen lassen, kein Effekt.
Zum SSL-Zugriff:
Da hosteurope kein SSL-Zertifikat für Privatleute ausstellt, greife ich auf den allgemeinen SSL-Zugang für deren Webpacks zurück. Das bedeutet allerdings, dass der Zugriff auf mein Backend nicht über
https://www.kashban.de/contenido erfolgt, sondern über
https://ssl.webpack.de/kashban.de/contenido/.
Zu 4.4.5-Zeiten funktionierte das mal, indem ich einfach alle contenido-HTML-Pfade in der Config.php auf die obige URL umgebogen habe, mit 4.6.15 und mod rewrite klappt das nicht. Es wird beim Loginversuch aus
https://ssl.webpack.de/kashban.de/contenido/ https://ssl.webpack.de/contenido/ und der Zugriff schlägt fehl.
Der Mandant zwoelfpluseins ist noch im Aufbau und spielt erst mal keine Rolle. Wenn der erste Mandant mit rewrite funktioniert, kriege ich den 2. auch hin.
Kann mir jemand weiterhelfen?
Vielen Dank!
Jürgen