Frameworks Yii URLFormat路径将不起作用
由于某种原因,由于我启用了urlManager,domain.com/site/logout/或domain.com/logout/将无法工作 这是我的.htaccess:Frameworks Yii URLFormat路径将不起作用,frameworks,yii,Frameworks,Yii,由于某种原因,由于我启用了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 i
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
。。。这是我的主要任务
'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>',
),
),
“组件”=>阵列(
“assetManager”=>数组(
“链接资产”=>true,
),
“用户”=>数组(
“allowAutoLogin”=>true,
),
'请求'=>数组(
'baseUrl'=>“http://google.com"
),
“urlManager”=>数组(
“urlFormat'=>“路径”,
'showScriptName'=>false,
'规则'=>数组(
'规则'=>数组(
'发布/'=>'发布/查看',
“posts/”=>“post/index”,
'/'=>'/',
),
),
有什么想法吗?谢谢:/尝试删除括号。编辑了我的规则。不再使用该特定规则。显然,现在唯一不起作用的部分是index.php没有被.htaccess删除(括号作为示例包含在guide.pdf中,但我还是删除了它们)“不工作”是什么意思?有错误消息吗?我的意思是我希望domain.com/index.php/this/that改为读取domain.com/this/that