Zum Inhalt springen

RealURL / CoolUri Startseite ohne startseite.html

Erstellt am 25. Oktober 2012 · 2 Antworten · letzte Antwort am 22. April 2013

Tags: RealURL, Frage

chucky2305 ·

Hallo Zusammen,

ich habe den Seitenbaum meiner Seite mal angehängt. Ich verwendet TYPO3 4.7.5 und RealURL in der Version 1.12.3.

Leider wird beim Aufruf von Domain.de eine Umleitung zu www.domain.de/startseite.html gemacht.
Dies würde ich aber gerne verhindern.
Schönheitsfehler: Beim Aufruf einer nicht existierenden URL würde ich gerne zur Startseite umleiten. Aber wie gesagt. Das ist ein kleineres Problem.

Ich habe auch schon folgende 3 Versuche gestartet:

1) Im RootVerweis, der auf die Startseite zeigt, bei Speaking URL path segment:einen / eingetragen.
2) In der Startseite bei Speaking URL path segment:einen / eingetragen.
3) In beiden (Rootverweis und Startseite) bei Speaking URL path segment:einen / eingetragen.

Im Fall 2) bekomme ich einen Error 310 (Too many redirects).

meine realurl_conf.php:

<?php
$TYPO3_CONF_VARS['FE']['addRootLineFields'].= ',tx_realurl_pathsegment';
$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
    '_DEFAULT' => array(
        'init' => array(
            'enableCHashCache' => 1,
            'appendMissingSlash' => 'ifNotFile',
            'enableUrlDecodeCache' => 1,
            'enableUrlEncodeCache' => 1,
            'postVarSet_failureMode' => '',
        ),
        'redirects' => array(),
        'preVars' => array(
            array(
                'GETvar' => 'no_cache',
                    'valueMap' => array(
                        'nc' => 1,
                    ),
                    'noMatch' => 'bypass',
            ),
            array(
                'GETvar' => 'L',
                'valueMap' => array(
                    # 'de' => '0',
                    'en' => '1',
                ),
                'valueDefault' => 'de',
                'noMatch' => 'bypass',
            ),
        ),
        'pagePath' => array(
                'type' => 'user',
                'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
                'spaceCharacter' => '-',
                'languageGetVar' => 'L',
                'expireDays' => 7,
                'rootpage_id' => 1,
                'firstHitPathCache' => 1,
        ),
        'fixedPostVars' => array(),
        'postVarSets' => array(
            '_DEFAULT' => array(
                // news archive parameters
                'archive' => array(
                    array(
                        'GETvar' => 'tx_ttnews[year]' ,
                    ),
                    array(
                        'GETvar' => 'tx_ttnews[month]' ,
                        'valueMap' => array(
                            'january' => '01',
                            'february' => '02',
                            'march' => '03',
                            'april' => '04',
                            'may' => '05',
                            'june' => '06',
                            'july' => '07',
                            'august' => '08',
                            'september' => '09',
                            'october' => '10',
                            'november' => '11',
                            'december' => '12',
                        )
                    ),
                ),
                // news pagebrowser
                'browse' => array(
                    array(
                        'GETvar' => 'tx_ttnews[pointer]',
                    ),
                ),
                // news categories
                'select_category' => array (
                    array(
                        'GETvar' => 'tx_ttnews[cat]',
                    ),
                ),
                // news articles anMd searchwords
                'article' => array(
                    array(
                        'GETvar' => 'tx_ttnews[tt_news]',
                        'lookUpTable' => array(
                            'table' => 'tt_news',
                            'id_field' => 'uid',
                            'alias_field' => 'title',
                            'addWhereClause' => ' AND NOT deleted',
                            'useUniqueCache' => 1,
                            'useUniqueCache_conf' => array(
                                'strtolower' => 1,
                                'spaceCharacter' => '-',
                            ),
                        ),
                    ),
                    array(
                        'GETvar' => 'tx_ttnews[backPid]',
                    ),
                    array(
                        'GETvar' => 'tx_ttnews[swords]',
                    ),
                ),
            ),
        ),
        // configure filenames for different pagetypes
        'fileName' => array(
            'defaultToHTMLsuffixOnPrev' => 1,
            'index' => array(
                'print.html' => array(
                    'keyValues' => array(
                        'type' => 98,
                    ),
                ),
                'rss.xml' => array(
                    'keyValues' => array(
                        'type' => 100,
                    ),
                ),
                'rss091.xml' => array(
                    'keyValues' => array(
                        'type' => 101,
                    ),
                ),
                'rdf.xml' => array(
                    'keyValues' => array(
                        'type' => 102,
                    ),
                ),
                'atom.xml' => array(
                    'keyValues' => array(
                        'type' => 103,
                    ),
                ),
            ),
        ),
    ),
);

?>

meine htaccess:

<IfModule mod_rewrite.c>

# Enable URL rewriting
RewriteEngine On

# Change this path, if your TYPO3 installation is located in a subdirectory of the website root.
RewriteBase /

# Rule for versioned static files, configured through:
# - $TYPO3_CONF_VARS['BE']['versionNumberInFilename']
# - $TYPO3_CONF_VARS['FE']['versionNumberInFilename']
# IMPORTANT: This rule has to be the very first RewriteCond in order to work!
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]

# Basic security checks
# - Restrict access to deleted files in Recycler directories
# - Restrict access to TypoScript files in default templates directories
# - Restrict access to Private extension directories
# For httpd.conf, use these lines instead of the next ones:
RewriteRule ^/TYPO3root/fileadmin/(.*/)?_recycler_/ - [F]
RewriteRule ^/TYPO3root/fileadmin/templates/.*(\.txt|\.ts)$ - [F]
RewriteRule ^/TYPO3root/typo3conf/ext/[^/]+/Resources/Private/ - [F]
RewriteRule ^fileadmin/(.*/)?_recycler_/ - [F]
RewriteRule ^fileadmin/templates/.*(\.txt|\.ts)$ - [F]
RewriteRule ^typo3conf/ext/[^/]+/Resources/Private/ - [F]

# 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/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]
RewriteRule ^(typo3/|t3lib/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]

# Redirect http://example.com/typo3 to http://example.com/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]

RewriteCond %{REQUEST_FILENAME}/index.pdf -f
RewriteRule   ^[^/]*\.pdf$  index.php

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

# If the file/symlink/directory does not exist => Redirect to index.php.
# For httpd.conf, you need to prefix each '%{REQUEST_FILENAME}' with '%{DOCUMENT_ROOT}'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

# Main URL rewriting.
# For httpd.conf, use this line instead of the next one:
# RewriteRule .* /TYPO3root/index.php [L]
RewriteRule .* index.php [L]

</IfModule>

### End: Settings for mod_rewrite ###


### Begin: PHP optimisation ###

# If you do not change the following settings, the default values will be used.

# TYPO3 works fine with register_globals turned off.
# This is highly recommended, if your web server has it turned on.
#php_flag register_globals off

### End: PHP optimisation ###



### Begin: Miscellaneous ###

# Make sure that directory listings are disabled.
#Options -Indexes

### End: Miscellaneous ###


# Add your own rules here.
# ...

Gruß,
Max

seitenbaum.png

chucky2305 ·

Ich habs jetzt so gelöst, indem ich den Knoten "root" der bisher ein Verweis auf Startseite war in eine Seite umgewandelt habe und die Inhalte von der vorherigen Startseite darein gezogen habe. Danach noch die ursrpüngliche "Startseite" gelöscht und fertig.

DarkNemesis ·

Die Lösung ist aber nur praktikabel, solange die Startseite kein eigenes Layout hat ... habe das gleiche Problem mit CoolUri und suche eine entsprechende Lösung. Deine Workaround hilft mir leider nicht, da Startseite und rest der Webseite unterschiedliche Templates haben 🙁