Thinkphp --- 去掉index.php
这里我使用的面板是宝塔,操作的 apche:
具体的配置可以参考这里:
https://www.cnblogs.com/fangziffff123/p/7588782.html
首先是:Thinkphp的配置:Common/Conf的配置:
/* 配置伪静态路由 */
'URL_MODEL'=>'2',
'URL_ROUTER_ON' =>true,
接下来就是服务器上,对具体网站的 .htaccess 的配置:
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>
然后访问:
http://text.think.com/Home/Index/show
就成功了。
Thinkphp --- 去掉index.php的更多相关文章
- Thinkphp去掉index.php
1.httpd.conf配置文件中 #LoadModule rewrite_module modules/mod_rewrite.so 把前面的警号去掉2.AllowOverride None 将No ...
- IIS 8.5 伪静态去掉index.php thinkphp 3.2.2
因为测试都是在win下开发的 win8.1企业版 II8.5 首先安装 Thinkphp 3.2.2 URL Rewrite Module 2.0 http://www.iis.net/downlo ...
- ThinkPHP 3.2,配置 'URL_MODEL'=>2。 APP_DEBUG设为false,U函数生成的URL的index.php不能去掉,只有将APP_DEBUG改成true,才能去掉index.php,求解~~
ThinkPHP 3.2,配置 'URL_MODEL'=>2.APP_DEBUG设为false,U函数生成的URL的index.php不能去掉,只有将APP_DEBUG改成true,才能去掉in ...
- thinkphp 去掉URL 里面的index.php
例如你的原路径是 http://localhost/test/index.php/home/goods/index.html 那么现在的地址是 http://localhost/test/home/g ...
- thinkphp 去掉URL 里面的index.php(?s=)
例如你的原路径是 http://localhost/test/index.php/home/goods/index.html 那么现在的地址是 http://localhost/test/home/g ...
- nginx 静态化合集(去掉index.php目录)
访问某域名时,去掉index.php目录时达到效果一样 如:www.test1/index.php/test2跟www.test1/test2效果一致 在vhosts.conf中加重写就可以了 loc ...
- lnmp 设置ci pathinfo和去掉index.php
LNMP上各个版本pathinfo各个版本的设置基本一样: lnmp v1.1上,修改对应虚拟主机的配置文件去掉#include pathinfo.conf前面的#,把try_files $uri = ...
- Apache RewriteCond RewriteRule 入门和Laravel去掉index.php
Ci删除index.php办法: 创建.htaccess 文件放到网站的根目录下,文件中的内容如下: RewriteEngine onRewriteCond %{REQUEST_FILENAM ...
- 更改CI框架默认访问路径及去掉index.php
下面是去掉index.php的操作 PHP CodeIgniter(CI)去掉 index.php - Langjun - 博客园 设置访问的默认路径是在
随机推荐
- Ubuntu创建新用户并增加管理员权限 删除某个用户
sudo adduser xxx 这样的命令会在home目录下添加一个帐号sudo useradd xxx 仅仅是添加用户, 不会在home目录添加帐号 删除:终端方法:以下用newuser代替想要删 ...
- TensorFlow基础笔记(11) conv2D函数
#链接:http://www.jianshu.com/p/a70c1d931395 import tensorflow as tf import tensorflow.contrib.slim as ...
- MFC中的UpdateData()
UpdateData()是MFC的窗口函数,用来刷新数据的,参数只有一个,默认为TRUE 简单的说: UpdateData(TRUE) == 将控件的值赋值给成员变量, UpdateData(FALS ...
- sdut2852 小鑫去爬山9dp入门)
#include<stdio.h> int a[100][100]; int main() { int n; while(scanf("%d",&n)!=EOF ...
- 【Java面试题】32 ArrayList和Vector的区别
1. Vector & ArrayList 相同点: 1.ArrayList和Vector都是继承了相同的父类和实现了相同的接口 2.底层都是数组实现的 3.初始默认长度都为10. 不同点: ...
- python--数据类型--1
原创博文,转载请标明出处--周学伟http://www.cnblogs.com/zxouxuewei/ 视频教程::http://www.imooc.com/learn/177 http://www. ...
- php 如何得到不含前导0的时分秒
通常我们获取时分秒是用 date("H:i:s") ,得到的效果是这样的 而如果想获取不含前导0的时分秒的话,就需要把前导0去掉. 如何去掉呢?我们来分析一下,07变7,20还是2 ...
- EHcache经典配置
记录重要的东西和常用的东西. <ehcache> <!-- 指定一个文件目录,当EHCache把数据写到硬盘上时,将把数据写到这个文件目录下 --> <diskStore ...
- Python 进阶(二)模块
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAW4AAABpCAIAAACVsl7UAAAgAElEQVR4nO2993vUxho2/P4r33XwSr
- os.path模块【python】
os.path.abspath(path) #返回绝对路径 os.path.basename(path) #返回文件名 os.path.commonprefix(list) #返回list(多个路径) ...