跳转到不同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

相关文章:

  • 2022-12-23
  • 2022-02-28
  • 2021-05-17
  • 2021-07-23
  • 2022-12-23
  • 2021-07-06
  • 2021-11-13
  • 2021-06-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-06
  • 2021-07-06
相关资源
相似解决方案