介绍
小编给大家分享一下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框架配置路由的方法有了一定的了解,想了解更多相关知识,欢迎关注行业资讯频道,感谢各位的阅读!