您现在的位置是:首页 > 网站建设常见问答网站建设常见问答
thinkphp 3.2.2在IIS配置伪静态去掉index.php
2017-02-23【网站建设常见问答】2009 人已围观
简介因为测试都是在win下开发的windows 7,然后配置的是iis ,今天需要去掉tp的index.php 我们需要做如下操作 首先安装 ...
因为测试都是在win下开发的windows 7,然后配置的是iis ,今天需要去掉tp的index.php 我们需要做如下操作
首先安装 Thinkphp 3.2.2
URL Rewrite Module 2.0
http://www.iis.net/downloads/microsoft/url-rewrite#additionalDownloads
上面地址选择 合适的版本下载安装
安装完成后 关闭IIS 在重新打开就可以看到url redirect控制图标就可以配置伪静态了.
详细代码如下
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<add value=\"index.php\" />
</files>
</defaultDocument>
<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>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<add value=\"index.php\" />
</files>
</defaultDocument>
<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>
关注宁波网站建设博客,更多精彩分享,敬请期待!
Tags:
很赞哦! ()
相关文章
随机图文
为什么我的企业网站没有流量分析
这几年来,宁波越来越多的中小公司开始上网并且制作网站,他们大多数的挑选都是花钱,请专业的公司做网站,然后挂网上就完事。但做完后,就那么放着...
.top域名开放注册啦
你想要一个短一点的好记一点的域名吗?是的 机会来了。宁波殷雯代理国际顶级域名 .top正式对外销售。 为何选择.top域名? ...
div覆盖div DIV相互重叠如何解决
div覆盖div,出现div与div盒子之间产生重叠覆盖现象,而内容没有出现覆盖重叠现象原因与解决方法。 可能您遇到过上下结构的布局,...网站建设的最终目的
为什么我们要做网站呢?这个问题拿今天来说应该是相当简单来回答的。 众所周知,做网站不在乎做网站的外表(外表是做给自己看) 看中的是...




微信收款码
支付宝收款码