!
也想出现在这里? 联系我们
广告位
当前位置:首页>开发>其他开发实例>TP伪静态

TP伪静态

1:Nginx配置

if (!-e $request_filename) {
  rewrite ^(.*)$ /index.php?s=$1 last;
  break;
}

2:Apache

<IfModule mod_rewrite.c>
  Options +FollowSymlinks -Multiviews
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>

3:IIS

<?xml version="1.0" ?>
<rules>
  <rule name="OrgPage_rewrite" 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>

给TA打赏
共{{data.count}}人
人已打赏
其他开发实例

CSS之文本两端对齐

2022-10-7 20:40:48

其他开发实例

TP6多应用模式配置及上线部署

2022-10-7 20:41:28

声明 本站上的部份代码及教程来源于互联网,仅供网友学习交流,若您喜欢本文可附上原文链接随意转载。无意侵害您的权益,请发送邮件至 [email protected] 或点击右侧 私信:林沐阳 反馈,我们将尽快处理。
0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索