thinkphp5 隐藏index.php方法
来源:互联网 发布:淘宝差评拦截在哪设置 编辑:程序博客网 时间:2024/06/05 21:47
在使用thinkphp 5开发restful API时经常会遇到路由配置问题。那么如何在隐藏请求URL中的index.php,让请求地址更加美观呢?
解决方法如下,在项目根目录新建 .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] SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0</IfModule>
阅读全文
0 0
- thinkphp5 隐藏index.php方法
- thinkphp5 IIS7.5 隐藏index.php的方法
- thinkphp5.0隐藏index.php入口文件
- thinkphp5在SAE上部署隐藏index.php
- ThinkPHP5 如何隐藏接口里面的index.php
- Thinkphp 隐藏 index.php 方法
- Nginx服务器下ThinkPHP5访问出现404以及URL隐藏index.php
- thinkPHP5隐藏入口文件index.php后 读取不到资源问题
- 关于ThinkPHP5.0在Apache下隐藏index.php报错的问题
- thinkphp5 去掉url里的index.php
- yii 隐藏index.php
- Yii隐藏index.php
- YII隐藏index.php
- ci 隐藏index.php
- thinkphp 隐藏index.php
- 6. 隐藏 index.php
- think隐藏index.php
- nginx 隐藏index.php
- 一些比较实用的网站
- mysqli扩展 增删改
- How to create more time?
- HDU-5510 Bazinga、HDU-5521 Meeting
- 47. Permutations II
- thinkphp5 隐藏index.php方法
- Mybatis操作数据库实现单表/多表查询流程
- java猜数字游戏
- Codeforces 868C Qualification Rounds
- [BZOJ]4300 绝世好题 Dp
- 上机练习2 类与对象
- 类与对象第一题
- java语言程序设计 第七章(7.21、7.35)
- HDU4778