Zum Inhalt springen

RealUrl läuft nicht! htaccess Fehler?

Erstellt am 23. Oktober 2006 · 2 Antworten · letzte Antwort am 13. Februar 2007

Tags: RealURL, Server & Hosting, Frage

xai ·

HAT SICH ERLEDIGT. Es lag einzig und allein daran, dass die htaccess _.htaccess hiess. SIE MUSS aber nur .htaccess heissen (ohne _)...man man, wie soll man darauf kommen! #angry#

Hallo,
ich bekomme meine Seite mit RealUrl einfach nicht zum laufen.

Die Links im Menü werden schon korrekt angezeigt.
Zum Beispiel: http://www.meineSite.de/home.html
Doch leider erhalte ich bei Auswahl nur den "Seite nicht gefunden"-404 Error.

Mein Typoscript:

# REALURL Configuration
config.simulateStaticDocuments_replacementChar = _
config.simulateStaticDocuments = 0
config.baseURL = www.meineSite.de/
config.tx_realurl_enable =1

Oder liegt der Fehler an der htaccess?
Achja, die _.htaccess liegt bei mir im htdocs, also im selben Ordner wie die Ordner wie typo3conf und typo3_src. Quasi nicht im selben Ordner wie die index.php? Muss ich deshalb was beachten?

Hier ein Auszug aus meiner htaccess:

# 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 /

# Stop rewrite processing if we are in the typo3/ directory
# For httpd.conf, use this line instead of the next one:
# RewriteRule ^/TYPO3root/(typo3|typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|showpic\.php)/ - [L]
RewriteRule ^(typo3|typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|showpic\.php)/ - [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 .* /TYPO3root/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 ###



# Add your own rules here
# REALURL
RewriteEngine On
RewriteBase /

RewriteRule ^(typo3|typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|showpic\.php)/ - [L]
RewriteRule ^typo3$ typo3/index_re.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule .* index.php

Achja...ich benutze die neuste RealURL-Version 1.10 und Typo3 4.0
Vielen Dank für die Hilfe!

xai

hombo13 ·

Das ist eine Extension, die ich noch nie korrekt habe installieren können. Auch dieses Beispiel hier hat bei mir nicht geklappt. Ich benutze T3 4.0.4 und habe das .htaccess genau so abgschrieben wie unten und ins "Root-Dir" gestellt. Auch den TS-Code habe ich eingefügt und meine Domain eingetragen. In der Adressleiste wird zwar richtig die URL angegeben aber das Stylesheet entfaltet nur auf der Homepage seine Wirkung. Geht man in einen Unterordner, so klappt es nicht mehr und die Seite wird ohne gültiges CSS gezeigt. Hat jemand eine todsichere Anleitung mit Beispiel? Natürlich habe ich beide Cache geleert. Ich schnall's einfach nicht??? #paralyzed# Vielen Dank für Hilfe.

hype ·

zwei fragen:
1. hast du den Unterstrich bei der .htaccess weggemacht und hat sie diesen Inhalt:

RewriteEngine On
RewriteRule ^typo3$ - [L]
RewriteRule ^typo3/.*$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php

2.hast du dei localconf.php richtig angepasst. also es muss drin sein:

$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables']['tx_realurl_urldecodecache'] = 'tx_realurl_urldecodecache';
$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables']['tx_realurl_urlencodecache'] = 'tx_realurl_urlencodecache';
$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables']['tx_realurl_pathcache'] = 'tx_realurl_pathcache';

das löscht den Cache von der Realurl
und es muss noch angegeben werden wie realurl encoden und decoden muss, z.b.

$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
   'preVars' => array(
      array(
         'GETvar' => 'L',
         'valueMap' => array(
            'de' => '0',
            'tr' => '1',
            'en' => '2',
         ),
         'valueDefault' => 'de',
      ),
   ),
   'pagePath' => array(
      'type' => 'user',
      'userFunc' =>
      'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
      'spaceCharacter' => '-',
      'languageGetVar' => 'L',
      'expireDays' => 3,
      'rootpage_id' => '1'
   ),
   'fileName' => array (
      'defaultToHTMLsuffixOnPrev' => 1,
      'index' => array(
         'page.html' => array(
            'keyValues' => array (
            'type' => 1,
            ),
         ),
      ),
   ),
 );

vergleiche dazu auch den Thread: #53861

Gruß hype