TYPO3真实网址无效

时间:2017-04-20 16:58:46

标签: php typo3 extbase realurl

我正在尝试在我自己的扩展程序上获取真正的网址扩展程序,但它无效。

我的错误在哪里?

我自己的扩展程序如何才能有一些不错的网址?

我的网址     http://domain.tld/eigenprojekte/project/show/test

我的realutl_conf.php

<?php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']=array (
  '_DEFAULT' => 
  array (
    'init' => 
    array (
      'appendMissingSlash' => 'ifNotFile,redirect',
      'emptyUrlReturnValue' => '/',
    ),
    'pagePath' => 
    array (
      'rootpage_id' => '1',
    ),
    'fileName' => 
    array (
      'defaultToHTMLsuffixOnPrev' => 0,
      'acceptHTMLsuffix' => 1,
      'index' => 
      array (
        'print' => 
        array (
          'keyValues' => 
          array (
            'type' => 98,
          ),
        ),
      ),
    ),
  ),
    'postVarSets' => array(
        '_DEFAULT' => array(
            'eigenprojekte' => array(
                array(
                    'GETvar' => 'tx_eigenprojekte_eigenprojekte[controller]',
                ),
                array(
                    'GETvar' => 'tx_eigenprojekte_eigenprojekte[show]',
                ),
                array(
                    'GETvar' => 'tx_eigenprojekte_eigenprojekte[project]',
                    'lookUpTable' => array(
                        'table' => 'tx_eigenprojekte_domain_model_project',
                        'id_field' => 'uid',
                        'alias_field' => 'project',
                        'addWhereClause' => ' AND NOT deleted',
                        'useUniqueCache' => 1,
                        'useUniqueCache_conf' => array(
                            'strtolower' => 1,
                            'spaceCharacter' => '-'
                        )
                    ),
                ),
            ),
        ),
    ),
);

1 个答案:

答案 0 :(得分:1)

首先检查realURl的配置。如果尚未在setup.ts文件中添加,请添加这两行。

config.simulateStaticDocuments = 0
config.tx_realurl_enable = 1

在你的realutl_conf.php文件中更改以下行。

'postVarSets' => array(
        '_DEFAULT' => array(
            .....
            ........
            array(
               'GETvar' => 'tx_eigenprojekte_eigenprojekte[action]', // add action keyword Not action name
            ),

           .........
           ..........

您也可以使用下面的fixedPostVars

'fixedPostVars' => array(
      '19'=> array(
          array(
              'GETvar' => 'tx_news_pi1[controller]',
              'noMatch' => 'bypass',
          ),
          array(
              'GETvar' => 'tx_news_pi1[action]',
              'noMatch' => 'bypass',
          ),
     ),
),

此处19是您的网页ID

相关问题