在子域名上实现 - '无法在服务器上找到文件' - 错误

时间:2015-07-14 13:11:46

标签: php .htaccess typo3-6.2.x

我要做的是:

一个有效的实际网址安装,它只提供导航的最后一个路径段ttt.bbb.org/navi/about/project而是ttt.bbb.org/project

它应该在子域上工作,然后可以转移到主域上的另一个服务器。子域只是用于升级项目的沙箱。

系统:

子域(ttt.bbbb.org)上的Typo3 6.2.14,带有符号链接到strato-server上根目录中的typo3 srcindex.php

错误:

realurl确实将php-endings转换为会话URL但无法在服务器上找到这些文件。

我的问题是:

  1. 哪个文件夹是.htaccess文件的正确文件夹?我真的 url进入typo3_src还是进入项目的安装?
  2. ts-template

    config.simulateStaticDocuments = 0
    config.baseURL = http: //www.ttt.bbb.org/
    config.tx_realurl_enable = 1
    config.uniqueLinkVars = 1
    config.linkVars = L(0-3)
    

    .htaccess

    RewriteEngine On
    RewriteRule ^typo3$ - [L]
    RewriteRule ^typo3/.*$ - [L]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule .* typo3_ttt/index.php
    

    realurl.conf

    <?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' => 42,
                    '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 and 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,
                        ),
                    ),
                ),
            ),
        ),
    );
    ?>
    

1 个答案:

答案 0 :(得分:0)

1)您应该将.htaccess文件放在 www 根目录中(存储 index.php (或符号链接)的同一文件夹)

2)真实URL配置文件的默认文件夹 - typo3conf(实际上您可以使用扩展管理器在真实URL属性中更改它)

3)在你的ts中 - config.baseURL = http://www.ttt.bbb.org/在http://后真的是“空格”?