Liebe Forumsgemeinde,
ich verzweifle gerade mal wieder an einem Problem und nach dem ich das nach Stunden noch nicht hinbekommen hab, hoffe ich noch, dass hier vielleicht der ein oder andere Experte eine Lösung weiß.
Ich habe nun also in einem Unterverzeichnis ein Typo3 Projekt erstellt: "domain.com/xy/"
Da ich den Server nicht selbst verwalte, bin ich davon ausgegangen, dass der Provider später die Domain auf dieses Verzeichnis aufschalten könnte. Aus mir unbekannten Gründen ist dies jedoch scheinbar nicht möglich.
Nun möchte ich also per .htaccess aus der Domain auf das Unterverzeichnis umschreiben.
Das habe ich ganz einfach per "RewriteRule .* /xy/index.php [L]" gelöst.
Funktioniert auch wunderbar, ich lande also per domain.com auf der Hauptseite von typo3. Die BaseUrl ist genau auf die Hauptdomain gesetzt.
Und hier tritt das Problem auf. Wenn ich nun auf den korrekt erzeugten link a la "domain.com/xy/meineseite.html" bekomme ich die Fehlermeldung "segment neseite.html was not a keyword for a postVarSet as expected!" er schneidet also scheinbar genau die Länge des Unterverzeichnisses inkl. / vom Schlüsselwort ab.
Auch ein RewriteBase brachte keine Besserung.
Vielleicht hat von euch jemand eine Idee wie das gehen könnte, oder sogar schon mal vergleichbares umgesetzt.
Hier noch meine .htaccess im Verzeichnis xy inkl. der sichtbaren Versuchen:
### Begin: Rewrite stuff ###
# Enable URL rewriting
RewriteEngine On
# To assist in debugging rewriting, you could use these lines
# DON'T enable it for production!
# This will only work in httpd.conf, not in .htaccess files
#RewriteLog /var/log/apache/rewrite.log
#RewriteLogLevel 9
# If you use the RealUrl extension, then you'll have to enable the next line.
# You will have to change this path if your TYPO3 installation is located
# in a subdirectory of the website root.
#
# If you place this in httpd.conf, you cannot use this directive in any case!
#RewriteBase /xy
# Stop rewrite processing if we are in the typo3/ directory
# For httpd.conf, use this line instead of the next one:
# RewriteRule ^/TYPO3root/(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|showpic\.php|favicon\.ico)/ - [L]
RewriteRule ^(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|showpic\.php|favicon\.ico|awstats|stats|cgi-bin|robots\.txt)/ - [L]
# Redirect http://mysite/typo3 to http://mysite/typo3/index_re.php
# and stop the rewrite processing
# For httpd.conf, use this line instead of the next one:
# RewriteRule ^/TYPO3root/typo3$ /TYPO3root/typo3/index.php [L]
RewriteRule ^typo3$ typo3/index_re.php [L]
# If the file/symlink/directory does not exist => Redirect to index.php
# Important note: If you copy/paste this into httpd.conf instead
# of .htaccess you will need to add '%{DOCUMENT_ROOT}' left to each
# '%{REQUEST_FILENAME}' part.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
# Main URL rewriting.
# If you use Windows and SimulateStaticDocuments do not work, try adding a
# slash (/) right before 'index.php' below.
# The example shows how to rewrite only *.html and *.pdf files to index.php
# This may be helpful when using an extension that can generate PDF files
# on the fly.
# Example: RewriteRule .*\.(html|pdf)$ index.php [L]
# For httpd.conf, use this line instead of the next one that has no '#':
#RewriteRule .* /xy/index.php [L]
# For use with the RealUrl extension, you might need to remove the
# RewriteBase directive somewhere above and use this line instead of the
# next one:
# RewriteRule .* /index.php [L]
RewriteRule .* index.php [L]
### End: Rewrite stuff ###
Diese Datei habe ich bereits auch mal im Hauptverzeichnis deponiert, hat auch nichts gebracht. Die Datei im Hauptverzeichniss enthält nur die Regel die ich oben angegeben habe.
Und die RealUrl config:
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
'init' => array(
'enableCHashCache' => 1,
'enableUrlDecodeCache' => 1,
'enableUrlEncodeHash' => 1,
// 'postVarSet_failureMode' => 'redirect_goodUpperDir',
),
'rewrite' => array(
),
'preVars' => array(
array(
'GETvar' => 'L',
'valueMap' => array(
'de' => '0',
'en' => '1',
),
'noMatch' => 'bypass',
),
array(
'GETvar' => 'type',
'valueMap' => array(
'print' => '98',
),
'noMatch' => 'bypass',
),
),
'pagePath' => array(
'type' => 'user',
'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
'spaceCharacter' => '-',
'languageGetVar' => 'L',
'rootpage_id' => 1,
'expireDays' => 3
),
'fileName' => array (
'defaultToHTMLsuffixOnPrev' => 1,
'index' => array(
'page.html' => array(
'keyValues' => array (
'type' => 1,
),
),
),
'print.html' => array(
'keyValues' => array (
'type' => 98,
),
),
),
'fixedPostVarSets' => array(
),
'postVarSets' => array(
),
);
Wenn weiter Informationen für eine Beantwortung nötig sind,
antwortet bitte einfach, ich lasse mich über Antworten per Mail informieren.
Vielen Dank im Vorraus.