网站首页 > 技术教程 正文
在建企业网站时离不了CMS系统,其中基于ThinkPHP(TP)框架的系统占绝大多数。ThinkPHP是一个快速、兼容而且简单的轻量级国产PHP开发框架,诞生于2006年初,原名FCS,2007年元旦正式更名为ThinkPHP,遵循Apache2开源协议发布,从Struts结构移植过来并做了改进和完善,同时也借鉴了国外很多优秀的框架和模式,使用面向对象的开发结构和MVC模式,融合了Struts的思想和TagLib(标签库)、RoR的ORM映射和ActiveRecord模式。
一、在Nginx下的伪静态规则,一般命名Nginx.conf
location / {
if (!-e $request_filename) {
rewrite ^(.*)nbsp; /index.php?s=/$1 last;
break;
}
}二、在Apache下的伪静态规则, 一般命名.htaccess
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)nbsp;index.php?s=$1 [QSA,PT,L]
</IfModule>三、在Windows的IIS下的伪静态规则,一般命名web.Config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="OrgPage" stopProcessing="true">
<match url="^(.*)quot; ></match>
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^(.*)quot; ></add>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" ></add>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" ></add>
</conditions>
<action type="Rewrite" url="index.php/{R:1}" ></action>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>猜你喜欢
- 2024-10-11 php手把手教你做网站(二十三)tp6 php8伪静态规则
- 2024-09-16 使用Docker搭建nginx静态资源服务1
- 2024-09-16 nginx代理静态资源(nginx 静态资源访问控制)
- 2024-09-16 在Docker容器中部署静态网站—Nginx部署的详细流程介绍
- 2024-09-16 Chevereto 图床系统的 Nginx 伪静态 Rewrite 规则
- 2024-09-16 Nginx静态资源优化配置之tcp_nopush和tcp_nodelay
欢迎 你 发表评论:
- 最近发表
- 标签列表
-
- 下划线是什么 (87)
- 精美网站 (58)
- qq登录界面 (90)
- nginx 命令 (82)
- nginx .http (73)
- nginx lua (70)
- nginx 重定向 (68)
- Nginx超时 (65)
- nginx 监控 (57)
- odbc (59)
- rar密码破解工具 (62)
- annotation (71)
- 红黑树 (57)
- 智力题 (62)
- php空间申请 (61)
- 按键精灵 注册码 (69)
- 软件测试报告 (59)
- ntcreatefile (64)
- 闪动文字 (56)
- guid (66)
- abap (63)
- mpeg 2 (65)
- column (63)
- dreamweaver教程 (57)
- excel行列转换 (56)

本文暂时没有评论,来添加一个吧(●'◡'●)