yii1.0隐藏index.php的方法:首先打开“httpd.conf”文件;然后开启“mod_rewrite.so”;接着将相对应目录的“AllowOverride”改为ALL;最后在index.php同级目录下新建.htaccess。

本文操作环境:windows7系统、yii1.0版,DELL G3电脑
YII 1.0 隐藏单入口index.php 设置路由与伪静态
隐藏 index.php
保证apache配置文件httpd.conf里的LoadModule
rewrite_module modules/mod_rewrite.so开启(去掉#)
将相对应目录的AllowOverride 改为ALL
在根目录下,即在index.php同级目录下新建.htaccess
jquery返回顶部隐藏按钮
jquery返回顶部隐藏按钮 , 这个在商城网站用的是很多的,商品的信息很长,通过鼠标滚轮返回到顶部,那就out了,所以,商城的产品信息页面会有一个返回顶部的按钮!创想鸟推荐下载!
165 查看详情
立即学习“PHP免费学习笔记(深入)”;
RewriteEngine on# if a directory or a file exists, use it directlyRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-d# otherwise forward it to index.phpRewriteRule . index.php
设置main.php 中的路由规则
// uncomment the following to enable URLs in path-format'urlManager'=>array('urlFormat'=>'path', 'showScriptName' =>false,'rules'=>array( 'index.html'=>array('index'), 'article/' => array('article/index','urlSuffix'=>'.html'), 'category//' => array('category/index','urlSuffix'=>'.html'), 'category//1' => array('category/index','urlSuffix'=>'.html'),),),
推荐:《yii教程》
以上就是yii 1.0 index.php怎么隐藏的详细内容,更多请关注创想鸟其它相关文章!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/371903.html
微信扫一扫
支付宝扫一扫