0

出于某种原因,由于我启用了 urlManager,因此 domain.com/site/logout/ 或 domain.com/logout/ 将无法工作。

这是我的.htaccess:

RewriteEngine on

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
RewriteRule . index.php

...这是我的 main.cfg

    'components'=>array(
       'assetManager' => array(
          'linkAssets' => true,
        ),
        'user'=>array(
           'allowAutoLogin'=>true,
         ),
         'request'=>array(
            'baseUrl' => "http://google.com"
         ),

         'urlManager'=>array(
                    'urlFormat'=>'path',
                    'showScriptName'=>false,
                    'rules'=>array(
                            'rules'=>array(
                                'post/<id:nd+>/<title:.*?>'=>'post/view',
                                'posts/<tag:.*?>'=>'post/index',
                                '<controller:nw+>/<action:nw+>'=>'<controller>/<action>',
                    ),
            ),

有任何想法吗?谢谢 :/

4

0 回答 0