您现在的位置是:首页 > 网站建设常见问答网站建设常见问答
thinkphp 3.2.2在IIS配置伪静态去掉index.php
2017-02-23【网站建设常见问答】1728 人已围观
简介因为测试都是在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:
很赞哦! ()
相关文章
随机图文
企业网站建设应该注意的一些东西
企业网站建设也有很多需要注意的地方。今天我们罗列一些常见的东西和大家说明一下。首先是企业网站的网址被称为“网络商标”,一个与企业名称和形象...mysql常见错误代码及解决办法
制作php+mysql的动态网站,数据库是经常需要打交道的事情。mysql一些常见的错误代码如下 130 :文件格式不正确。(还不是很清楚...最全的微信公众号图文内容添加超链接的方法总结
现在微信营销有种会替代网络营销的感觉,微信广告是铺天盖地的出来。微信在早期是允许用户在后台发布文章时自己定义链接,包括文字链接和图片链接。...双语网站中的外语翻译有谁提供?
外语版文字翻译由谁来准备? 外语版网站开发并不包含外语文字翻译工作,如果企业客户没有额外委托我们殷雯网络进行网站文案的翻译服务,则外语版的...