thinkphp 去掉URL 里面的index.php(?s=)
例如你的原路径是 http://localhost/test/index.php/home/goods/index.html 那么现在的地址是 http://localhost/test/home/goods/index.html 如何去掉index.php呢?
1.httpd.conf配置文件中加载了mod_rewrite.so模块 //在APACHE里面去配置 #LoadModule rewrite_module modules/mod_rewrite.so把前面的警号去掉
2.AllowOverride None 讲None改为 All //在APACHE里面去配置 (注意其他地方的AllowOverride也统统设置为ALL) <Directory "D:/server/apache/cgi-bin"> AllowOverride none 改 AllowOverride ALL Options None Order allow,deny Allow from all </Directory>
3.确保 config.php 里面配置项 URL_MODEL 设置为 2 return Array( 'URL_MODEL' => '2', );
4 .htaccess文件必须放到项目跟目录下 这个文件里面加: <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] </IfModule>
thinkphp 去掉URL 里面的index.php(?s=)的更多相关文章
- thinkphp 去掉URL 里面的index.php
例如你的原路径是 http://localhost/test/index.php/home/goods/index.html 那么现在的地址是 http://localhost/test/home/g ...
- 如何去掉wordpress网站url里面的index.php(Apache服务器)
在wordpress根目录新建.htaccess文件,并拷贝以下代码保存即可. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase ...
- ThinkPHP去掉URL中的index.php
我的环境是apache+ubuntu 1,先确认你有没mod_rewrite.so模块 /usr/lib/apache2/modules/mod_rewrite.so 然后在httpd.conf最后一 ...
- angular 去掉url里面的#
1.适合客户端的方法,但是页面不能刷新,一刷新就404 (1)在index.html里添加 <base href="/"> (2)在app.js的config里,注入$ ...
- ThinkPHP 隐藏URL中的 index.php
去掉 URL 中的 index.php 通常的URL里面含有index.php,为了达到更好的SEO效果可能需要去掉URL里面的index.php ,通过URL重写的方式可以达到这种效果,通常需要服务 ...
- ThinkPHP5 隐藏接口里面的index.php
隐藏index.php 官方介绍是这样的:http://www.kancloud.cn/thinkphp/thinkphp5_quickstart/145250 可以去掉URL地址里面的入口文件ind ...
- CI在nginx环境下去掉url中的index.php
在nginx环境下CI框架默认URL规则访问不了,出现500错误,如: http://blog.php230.com/index.php/keywords 今天在服务器配置CI框架环境时,去除URL中 ...
- ThinkPHP去除url中的index.php
例如你的原路径是 http:.httpd.conf配置文件中加载了mod_rewrite.so模块 .AllowOverride None 讲None改为 All .确保URL_MODEL ...
- ThinkPHP -- 去除URL中的index.php
原路径是 http://localhost/test/index.php/index/add 想获得的地址是 http://localhost/test/index/add 那么如何去掉index.p ...
随机推荐
- 安全测试 + 渗透测试 Xmind 要点梳理
从事测试工作多年,一直对安全测试充满神秘感.买了本书,闲来无事时翻看了解.发现书的开头提供的Xmind脑图挺有参考价值,所以做了次“搬运工”,提供给想接触了解安全测试/渗透测试的小伙伴. 安全测试要点 ...
- vue -- 使用sass并引入公共sass文件
sass可以提高我们的开发效率,怎么在vue的项目中使用sass并且可以设置一些公共的文件呢? 使用sass 1.安装sass的依赖包 npm install --save-dev sass-load ...
- struts2学习笔记——常见报错及解决方法汇总(持续更新)
操作环境:(1)Tomcat 7.0.72.0 (2)OS Name: Windows 7 (3)JVM Version: 1.8.0_25-b18 (4)eclipse Version: Ke ...
- 用js实现倒计时功能
源码如下: 原理很简单,看注释吧 <!DOCTYPE html> <html lang="en"> <head> <meta charse ...
- CF986A Fair
题目描述 Some company is going to hold a fair in Byteland. There are n n n towns in Byteland and m m m t ...
- Github网站css加载不出来的处理方法(转,亲测有效)
转载链接:https://blog.csdn.net/qq_36589706/article/details/80573008因为工作需求,自己会经常使用到github,但是突然有一天打开github ...
- string中执行sql语句
Spring(JdbcTemplate.class)中的queryForMap().queryForObject().queryForLong().queryForInt()等方法都会去调用publi ...
- myeclipse部署maven时,src/main/resources里面配置文件加载不到webapp下classes路径下的问题
解决myeclipse部署maven时,src/main/resources里面配置文件加载不到webapp下classes路径下的问题. 有时候是src/main/resources下面的,有时候是 ...
- python3——“->”的含义
->:标记返回函数注释,信息作为.__annotations__属性提供,__annotations__属性是字典.键return是用于在箭头后检索值的键.但是在Python中3.5,PEP 4 ...
- DB restore point and datagurad
######## 12.5.1 Flashing Back a Physical Standby Database to a Specific Point-in-Time The following ...