hahahaha78 发表于 2006-12-13 10:23:45

realurl问题

晕啊,,,,,,,本机测试一切正常,应用到网站上前后台都无法打开,

域名也配置了,

环境和本机相同,就是无法打开,郁闷啊!!!!!!!!1



有用过这个扩展的吗????????



无论如何配置总是显示

no news_id given

怎么办????


问题已解决,但是在在BACKPID问题

[ 本帖最后由 hahahaha78 于 2007-1-4 13:48 编辑 ]

ratwerwer 发表于 2006-12-14 18:44:18

我比你还要郁闷,我MOC_REWRITE在我的机器里打开了,但就是不起作用,不知道什么原因.

gokure 发表于 2007-1-2 12:28:58

配置realurl要先配置下面几处:

# LoadModule rewrite_module modules/mod_rewrite.so

将"#"去掉

找到类似下面的配置处,下面的"D:/wwwroot"是我的Apache网站的根目录
<Directory "D:/wwwroot">

在这下面找到
AllowOverride None
改为
AllowOverride All

这样设置 .htaccess 文件才能生效

然后就是设置 .htaccess,Typo3的Config等等

这里,我再给出一个localconf.php中对realurl的配置,里面有些配置可能有针对性,需修改。

// Activate script Hook, normaly already done in ext/realurl/ext_localconf.php
$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['linkData-PostProc'][] = 'EXT:realurl/class.tx_realurl.php:&tx_realurl->encodeSpURL';
$TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkAlternativeIdMethods-PostProc'][] = 'EXT:realurl/class.tx_realurl.php:&tx_realurl->decodeSpURL';
// script Hook for clear all cache, normaly already done in ext/realurl/ext_localconf.php
$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['FE']['addRootLineFields'] .= ',tx_realurl_pathsegment,alias,nav_title,title';

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array (
    '_DEFAULT' => array (
        'init' => array (
            'enableCHashCache' => '1',
            'appendMissingSlash' => 'ifNotFile',
            'enableUrlDecodeCache' => '1',
            'enableUrlEncodeCache' => '1',
        ),
        'redirects' => array (
        ),
        'preVars' => array (
            '0' => array (
                'GETvar' => 'no_cache',
                'valueMap' => array (
                    'nc' => '1',
                ),
                'noMatch' => 'bypass',
            ),
            '1' => array (
                'GETvar' => 'L',
                'valueMap' => array (
                    'dk' => '2',
                    'de' => '1',
                ),
                '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' => '93',
        ),
        'fixedPostVars' => array (
        ),
        'postVarSets' => array (
            '_DEFAULT' => array (
              // tx_newloginbox_pi1
              'password' => array(
               '0' => array(
                'GETvar' => 'tx_newloginbox_pi1',
                'valueMap' => array(
                 'getpassword' => '1',
                ),
               ),
              ),
              // tx_ttnews
                'archive' => array (
                    '0' => array (
                        'GETvar' => 'tx_ttnews',
                    ),
                    '1' => array (
                        'GETvar' => 'tx_ttnews',
                        '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',
                        ),
                    ),
                ),
                'browse' => array (
                    '0' => array (
                        'GETvar' => 'tx_ttnews',
                    ),
                ),
                'select_category' => array (
                    '0' => array (
                        'GETvar' => 'tx_ttnews',
                    ),
                ),
                'article' => array (
                    '0' => array (
                        'GETvar' => 'tx_ttnews',
                        'lookUpTable' => array (
                            'table' => 'tt_news',
                            'id_field' => 'uid',
                            'alias_field' => 'title',
                            'addWhereClause' => ' AND NOT deleted',
                            'useUniqueCache' => '1',
                            'useUniqueCache_conf' => array (
                                'strtolower' => '1',
                                'spaceCharacter' => '-',
                            ),
                        ),
                    ),
                    '1' => array (
                        'GETvar' => 'tx_ttnews',
                    ),
                ),
            ),
        ),
        'fileName' => array (
            'index' => array (
             'index.html' => array(
                 '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',
                     ),
                 ),
                ),
            ),
   // add .html suffix to the end of the path generated
            'defaultToHTMLsuffixOnPrev' => 1,
        ),
    ),
);

$TYPO3_CONF_VARS['FE']['pageNotFound_handling_statheader'] = 'HTTP/1.0 404 Not Found';
$TYPO3_CONF_VARS["FE"]["pageNotFound_handling"] = 'READFILE:fileadmin/template/_system/404.html';


最后,祝你好运!

[ 本帖最后由 gokure 于 2007-1-2 12:36 编辑 ]

hahahaha78 发表于 2007-1-4 13:47:18

你这个配置未配置BACKPID,当使用BACKPID时,生成的HTML后面还是带有参数,
除非不使用BACKPID,

偶想问的是如何在配置中配置BACKPID,使每个新闻都返回到其所属的分类的新闻列表中

allenl 发表于 2007-3-7 11:28:17

用realurl的话可安装个这插件 来配置 urltool....
页: [1]
查看完整版本: realurl问题