是伪静态规则得问题,用IIS搭建网站 根目录下需要 有一个 web.config 文件 里面就可以放一些伪静态规则之类得
错误的原因有2中
服务器得IIS 是否安装得伪静态插件? 如果没安装就需要下载安装一套 http://www.tugaga.com/soft/fjq/189.html
web.config 内得伪静态规则 不要用官方提供得,哪个是错得 每次用都不打开网站 这里土嘎嘎小编给大家提供一套IIS伪静态规则
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="txtcms" stopProcessing="true">
<match url="(.*)$" />
<conditions logicalGrouping="MatchAll">
<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}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
将这套代码全部写入 web.config 即可
如果伪静态插件装不明白 就直接在你机器里装一套 http://www.tugaga.com/soft/fjq/176.html 护卫神管理好了,自动继承所有IIS组件