Yii 入门

跳转到不同module

Redirect to module after login Yii

$this->redirect( array('/tradesman/default/index') )

怎么移除 URL 里的 index.php

Removing index.php from URL cause 404 in yii

在webapp的根目录下添加.htaccess文件。记住是根目录(md,我看protect下有一个.htaccess就没多想,害我调整了一上午,真是sb)

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
posted @ 2017-11-21 10:55  码不能停  阅读(130)  评论(0编辑  收藏  举报