当前位置:网站首页>About the apache .htaccess file of tp
About the apache .htaccess file of tp
2022-08-02 03:53:00 【auspi12341】
In order to hide index.php in the url, you need to write RewriteRule
View the Server API printed by phpinfo(): Apache 2.0 Handler
View the Server API printed by phpinfo(): CGI/FastCGI
====================================================================
Default:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
=====================================================================
If it is Server API: CGI/FastCGI needs to be modified as:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond%{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
=====================================================================
If the Apache configuration file uses Alias mapping to access the directory
Alias /sports "D:/WorkSpace/Sports/public/"
Need to add Rewritebase /sports
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
Rewritebase /sports
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
边栏推荐
猜你喜欢
随机推荐
---static page---
微信小程序怎么批量生成带参数的小程序码?
__dirname
线程池(线程池介绍与使用)
每日五道面试题总结 22/7/19
三月底啦啦
debian 10 nat and routing forwarding
SQL:DDL、DML、DQL、DCL相应介绍以及演示
Guangzhou Huawei Interview Summary
ES6三点运算符、数组方法、字符串扩展方法
js eventLoop 事件循环机制
关于tp的apache 的.htaccess文件
IO流、字节流、字节缓冲流
The querystring module
这些JS题面试时一定要答对!
display,visibility,opacity
[league/flysystem]一个优雅且支持度非常高的文件操作接口
TypeScript 错误 error TS2469、error TS2731 解决办法
PHP8.2将会有哪些新东西?
猴子选大王(约瑟环问题)




![[league/climate]一个功能健全的命令行功能操作库](/img/ce/39114b1c74af649223db97e5b0e29c.png)



