当前位置:网站首页>关于tp的apache 的.htaccess文件
关于tp的apache 的.htaccess文件
2022-08-02 03:24:00 【auspi12341】
为了在url中隐藏index.php,需要写 RewriteRule
查看phpinfo() 打印的Server API: Apache 2.0 Handler
查看phpinfo() 打印的Server API: CGI/FastCGI
==================================================================
默认的:
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
</IfModule>
==================================================================
如果为 Server API: CGI/FastCGI 需要修改为:
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>
==================================================================
如果 Apache 的配置文件中使用 Alias 映射访问目录
Alias /sports "D:/WorkSpace/Sports/public/"
需要加上 Rewritebase /sports
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
Rewritebase /sports
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
</IfModule>
边栏推荐
- require模块化语法
- js takes the value of a feature at a certain position in the string, such as Huawei=> Huawei
- 4.14到新公司的一天
- 利用 nucleo stm32 f767zi 进行USART+DMA+PWM输入模式 CUBE配置
- 枚举法方法:(leetcode1300)转变数组后最接近目标值的数组和
- kettle 安装与配置
- js 数组去重的常用方法
- require modular syntax
- ES6数组的扩展方法map、filter、reduce、fill和数组遍历for…in for…of arr.forEach
- DSPE-PEG-DBCO Phospholipid-Polyethylene Glycol-Dibenzocyclooctyne A Linear Heterobifunctional Pegylation Reagent
猜你喜欢
SQL:DDL、DML、DQL、DCL相应介绍以及演示
最新,每天填坑,Jeston TX1 精卫填坑,第一步:刷机
1.6一些今日学习
Advanced gradient of skeleton effect, suitable for waiting for pictures
线程池(线程池介绍与使用)
解决 Zlibrary 卡死/找不到域名/达到限额问题,Zlibrary最新地址
DSPE-PEG-PDP, DSPE-PEG-OPSS, phospholipid-polyethylene glycol-mercaptopyridine supply, MW: 5000
三元判断再三元判断
微信小程序云开发之券码领取,怎么防止用户领取到相同的数据?
URL module
随机推荐
js的“类数组”及“类数组转数组”
4.14到新公司的一天
线程池(线程池介绍与使用)
ES6迭代器解释举例
如何根据地图上的两个坐标点来确定方向
三月底啦啦
项目中遇到的问题
require模块化语法
解决MySQL创建子视图并查看的时候,字符集报错问题
Advanced gradient of skeleton effect, suitable for waiting for pictures
SQL:DDL、DML、DQL、DCL相应介绍以及演示
我的小笔记 =》原生微信小程序
Phospholipid-polyethylene glycol-targeted neovascularization targeting peptide APRPG, DSPE-PEG-APRPG
页面加载流程
js takes the value of a feature at a certain position in the string, such as Huawei=> Huawei
clock tick marks
DOM manipulation---magnifying glass case
js预编译 GO 和AO
npm --package.json---require
解决 Zlibrary 卡死/找不到域名/达到限额问题,Zlibrary最新地址