1.路由设置,让路径中不显示index.php方法: 第一步:在apache中的httpd.conf中查找: LoadModule rewrite_module modules/mod_rewrite.so 将该项前面的#去掉,开启重写模式 AllowOverride none 修改成为 AllowOverride all 第二步:在index.php同级目录下,新建一个.htaccess文件(在windows下面,可以用文本文件建立该类型文件),添加内容为: <IfModule mod_rew…
隐藏index.php文件 目的:想去掉浏览器地址栏中的 index.php?r= 这一块. 在/config/web.php中   ’components'=>[]   中添加如下代码: 'urlManager' => [ 'enablePrettyUrl' => true,//路由的路径化 'enableStrictParsing' => false,//禁止严格url解析 'showScriptName' => false,//允许去掉index.php 'rules'…
隐藏index.php   一.codeigniter codeigniter和许多php框架一样,有个单一入口index.php,从url上看,显得很不友好.通过apache的rewirte,是可以隐藏掉的,实现伪url. 打开codeigniter下system\application\config中的config.php 找到$config['index_page'] = "index.php"; 改为 $config['index_page'] = "";…
tp官网已经写了 http://doc.thinkphp.cn/manual/hidden_index.html 不生效 重启nginx .问题依旧 kill掉nginx进程  再启动 贴段自己的配置: server { listen 80; server_name url; root /*/*/*; #include conf.d/ipFilter.conf; #access_log /data/logs/$server_name.access.log main; if ($http_user…
首先,.htaccess文件要配置好隐藏index.php.系统默认生成的就行. 然后,也是最关键的一部,要在Application/Home/Conf里的config.php文件中增加如下配置: <?php return array( //'配置项'=>'配置值' 'URL_MODEL' => '2' ); 这样就好了.…
隐藏index.php可以去掉URL地址里面的入口文件index.php,但是需要额外配置WEB服务器的重写规则.以Apache为例,需要在入口文件的同级添加.htaccess文件(官方默认自带了该文件),内容如下:<IfModule mod_rewrite.c>Options +FollowSymlinks -MultiviewsRewriteEngine onRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME}…
有些朋友提到关于TPshop 隐藏index.php 一问题, 可以修改 Application\Common\Conf\config.php 文件代码 'common', 'AUTH_CODE' => "TPSHOP", //安装完毕之后不要改变,否则所有密码都会出错 //'URL_CASE_INSENSITIVE' => false, //URL大小写不敏感 'LOAD_EXT_CONFIG'=>'db,route', // 加载数据库配置文件 'LOAD_EXT…
我要隐藏目录下的index.html,修改Nginux配置如下: 1.修改文档顺序 index  index.html index.php 2.开启目录流量 在server或location 段里添加上autoindex on;来启用目录流量 a.直接二级目录开启目录流量 location /down/ {autoindex on;} b.整个虚拟主机开启目录流量 在server段添加 location / {autoindex on;autoindex_localtime on; #之类的参数…
和朋友在做一个小网站,用到了CI框架,之前测试都是在windows上,隐藏index.php也相对比较简单.但服务器是ubuntu系统,需要配置一下,根据网上看到的一些教程,结合自己电脑的特点,记录步骤如下: 1.服务器环境: ubuntu12.04  64位 2.开启mod_rewrite模块: (1)将 /etc/apache2/mods-available/rewrite.load 连接到 /etc/apache2/mods-enabled/rewrite.load 来打开 Mod_rew…
同时支持PATH于GET格式路由(修改框架文件 简直坑) framework/web/CUrlManager.php parseUrl方法 第一行判断修改成 if($this->getUrlFormat()===self::PATH_FORMAT && !isset($_GET[$this->routeVar]) && !isset($_POST[$this->routeVar])) 隐藏index.php protected/config/main.ph…