yii框架的路由怎么配置

  介绍

这篇文章主要介绍yii框架的路由怎么配置,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!

首先要在服务器配置(httpd。conf)中开启重写模块

#开启重写模块,将其前面的#去掉/mod_rewrite.so LoadModule  rewrite_module 模块   #目录中允许覆盖开启   & lt; Directory “$ {SRVROOT}/htdocs"比;   ,,#   ,,,#,Possible  values  for 从而Options  directive 断开连接;“None",,“All",   ,,,#,趁机any  combination :   号,,,,,,Indexes  Includes  FollowSymLinks  SymLinksifOwnerMatch  ExecCGI  MultiViews方法   ,,#   ,,,#,Note  that “MultiViews", must  be  named 显式地* *,——安康;“Options  All"   ,,,#,并# 39;t  give  it 用你。   ,,#   ,,,#,从而Options  directive  is  both  complicated 以及重要的又是;Please 请参阅   ,,,#,http://httpd.apache.org/docs/2.4/mod/core.html选项   ,,,# for  more 信息。   ,,#   ,,,Options  Indexes  FollowSymLinks      ,,#   ,,,#,AllowOverride  controls  what  directives  may  be  placed  .htaccess 拷贝文件。   ,,,#,It 还要be “All",,“None",,趁机any  combination  of ,关键词:   号,,,,,,Options  FileInfo  AuthConfig 极限   ,,#   ,,AllowOverride 所有      ,,#   ,,,#,Controls  who 还要get  stuff 得到却;能够服务器。   ,,#   ,,,Require  all 理所当然   & lt;/Directory>

(相关教程推荐:yii框架)

在目录下加入服务器配置文件。htaccess

 & # 39;urlManager& # 39;,=祝辞,(
  ,,,& # 39;enablePrettyUrl& # 39;,=祝辞,真的,
  ,,,& # 39;showScriptName& # 39;,=祝辞,假的,,,,,//& # 39;后缀# 39;,=祝辞,& # 39;. html # 39;//URL后缀],

重启服务器。

以上是“yii框架的路由怎么配置”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注行业资讯频道!

yii框架的路由怎么配置