由于测试都是在win下开发的 win8.1企业版php
II8.5 首先安装 Thinkphp 3.2.2 web
http://www.iis.net/downloads/microsoft/url-rewrite#additionalDownloads函数
上面地址选择 合适的版本下载安装测试
安装完成后 关闭IIS 在从新打开网站
在你创建的网站根目录有 web.config 这个文件url
输入伪静态规则spa
<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>
具体位置参考下个人.net
<?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>
而后访问之前带index.php/控制器/方法 的连接 去掉index.php看看code
这个index.php对于JS来讲 很很差 用uploadify上传后台地址用U函数生成index.php就很很差 总出错xml
其余的一到后台地址 有index.php老是出错
伪静态规则仍是不懂 等先作出来慢慢研究下