友声网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
开启左侧

IIS下让PHP支持path_info的方法

[复制链接]
卡卡北 发表于 2018-12-27 21:04 | 显示全部楼层 |阅读模式
在网站根目录建一个文件web.config

输入一下内容:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <configuration>
  3.     <system.webServer>
  4. <rewrite>
  5.   <rules>
  6.   <rule name="OrgPage" stopProcessing="true">
  7.   <match url="^(.*)$" />
  8.   <conditions logicalGrouping="MatchAll">
  9.   <add input="{HTTP_HOST}" pattern="^(.*)$" />
  10.   <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
  11.   <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
  12.   </conditions>
  13.   <action type="Rewrite" url="index.php/{R:1}" />
  14.   </rule>
  15.   </rules>
  16. </rewrite>
  17.     </system.webServer>
  18. </configuration>
复制代码
 楼主| 卡卡北 发表于 2018-12-27 21:06 | 显示全部楼层

RSS|无图版|手机版|友声网 ( 鲁ICP备15020090号-1 )|网站地图 | 点击这里给我发消息 |

GMT+8, 2024-4-26 04:48 , Processed in 0.119470 second(s), 7 queries , MemCache On.

Powered by Discuz! X

© ys166.com

快速回复 返回顶部 返回列表