thinkphp 隐藏index.php iis apache nginx
来源:互联网 发布:家庭网络布线多少米 编辑:程序博客网 时间:2024/05/17 11:59
针对不同的web服务器,iis7 apache nginx 可以使用不同的方法来进行配置
1.iis7 在站点根目录下添加web.config
添加内容
<?xml version="1.0" encoding="UTF-8"?><configuration> <system.webServer><rewrite> <rules><rule name="OrgPage" stopProcessing="true"> <match url="^(.*)$" /> <conditions logicalGrouping="MatchAll"><add input="{HTTP_HOST}" pattern="^(.*)$" /><add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /><add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index.php/{R:1}" /></rule> </rules></rewrite> </system.webServer></configuration>
重启iis生效
2.apache 在根目录下添加 .htaccess 添加内容:
<IfModule mod_rewrite.c>RewriteEngine onRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] </IfModule>
重启apache 生效
3.对于nginx 添加内容到站点配置文件,然后重载配置文件生效
- location / {
- if (!-e $request_filename) {
- rewrite ^(.*)$ /index.php?s=$1 last;
- break;
- }
- }
阅读全文
0 0
- thinkphp 隐藏index.php iis apache nginx
- thinkphp 隐藏index.php
- thinkPHP Apache 优化url,隐藏index.php所需配置
- nginx 隐藏index.php
- Thinkphp 隐藏 index.php 方法
- bae+ThinkPHP隐藏index.php
- thinkphp隐藏Index.php入口
- 关于ThinkPHP隐藏index.php
- thinkphp+apache 去掉index.php
- windows下修改nginx pathinfo支持、thinkphp在nginx环境下隐藏index.php
- thinkphp nginx实现url pathinfo模式并隐藏url index.php
- thinkphp的nginx配置,以及重写隐藏index.php入口文件
- 配置thinkphp路由,隐藏index.php
- ThinkPHP框架里隐藏index.php
- thinkphp 后台入口隐藏index.php
- nginx pathinfo 并隐藏index.php
- nginx 隐藏index.php 支持PATHINFO
- Nginx配置 隐藏入口文件index.php
- Android 关于adb授权原理
- FireMonkey下的WndProc实现
- TreeGrid jQuery plugin
- Android JAVA源码之打印调用栈
- 1.数据库-MongoDB安装
- thinkphp 隐藏index.php iis apache nginx
- let&const进阶
- Laravel学习之
- 7.12--SSH学习之Struts上传和下载和Ajax,Json
- PHP内核探索:PHP中的哈希表
- Spring5:@Autowired注解、@Resource注解和@Service注解
- spark--actions算子--takeSample
- Spring Cloud生态圈简介
- c语言运算符与表达式的优先级