Win7系统IIS7+ThinkPHP如何使用 REWRITE模式
2017-11-27 03:00
141 查看
REWRITE模式(PATHINFO模式基础上隐藏index.php)
新建一个 web.config (UTF-8)文件,打开该文件,写下面的代码
新建一个 web.config (UTF-8)文件,打开该文件,写下面的代码
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="已导入的规则 1" stopProcessing="true"> <match url="^(.*)$" ignoreCase="false" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> </conditions> <action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" /> </rule> </rules> </rewrite> </system.webServer> </configuration> 保存,到此就可以使用 隐藏index.php的模式了
相关文章推荐
- 如何将多种设计模式结合使用(有原代码)
- 如何将多种设计模式结合使用(源代码)
- JSP设计模式基础:View Helper模式——学习如何使用View Helper模式使得Model数据适应表现层的需要(1)
- JSP设计模式基础:View Helper模式——学习如何使用View Helper模式使得Model数据适应表现层的需要(2)
- JSP设计模式基础:View Helper模式——学习如何使用View Helper模式使得Model数据适应表现层的需要(2)
- JSP设计模式基础:View Helper模式——学习如何使用View Helper模式使得Model数据适应表现层的需要(3)
- 与Erich Gamma的一次谈话(第一部分) - 如何使用设计模式 (zt)
- JSP设计模式基础:View Helper模式——学习如何使用View Helper模式使得Model数据适应表现层的需要(1)
- JSP设计模式基础:View Helper模式——学习如何使用View Helper模式使得Model数据适应表现层的需要(3)
- 如何使用动态共享对象的模式来安装PHP
- 如何使用设计模式来构造系统--(1)
- 如何使用设计模式来构造系统--(2)
- 如何使用设计模式来构造系统--(3)
- JSP设计模式基础:View Helper模式——学习如何使用View Helper模式使得Model数据适应表现层的需要(3)
- 如何使用动态共享对象的模式来安装PHP
- JSP设计模式基础:View Helper模式——学习如何使用View Helper模式使得Model数据适应表现层的需要(2)
- JSP设计模式基础:View Helper模式——学习如何使用View Helper模式使得Model数据适应表现层的需要(2)
- JSP设计模式基础:View Helper模式——学习如何使用View Helper模式使得Model数据适应表现层的需要(2)
- JSP设计模式基础:View Helper模式——学习如何使用View Helper模式使得Model数据适应表现层的需要(3)
- 如何使用委托与事件来实现观察者模式