首页 > CMS教程 > 正文

eyoucmsIIS7 下的伪静态规则是什么?
2019-07-05 08:57:00   来源:   评论:0 点击:

问:IIS7 下的伪静态规则是什么? 答:针对不同服务器、虚拟空间,运行PHP的环境也有所不同,目前主要分为:Nginx、apache、IIS以及其他服务器。下面分享如何去掉URL上的index php字符,记得在管理后台清除缓存,对于一些ECS服务器可能要重启nginx等服务

问:IIS7 下的伪静态规则是什么?

答:针对不同服务器、虚拟空间,运行PHP的环境也有所不同,目前主要分为:Nginx、apache、IIS以及其他服务器。下面分享如何去掉URL上的index.php字符,记得在管理后台清除缓存,对于一些ECS服务器可能要重启nginx等服务!

【IIS服务器】查看服务器的网站根目录下是否有 web.config 文件,将红色代码添加<system.webServer>与</system.webServer>之间。如果没有web.config文件,就将全部代码保存为web.config文件,上传到网站根目录下,记得去后台清除缓存,再从网站首页访问哦!

<?xml version="1.0" encoding="UTF-8"?><configuration><system.webServer><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>

相关热词搜索:

上一篇:第一页
下一篇:eyoucms 列表页第一篇文章与其他文章不同样式实现方法

分享到: 收藏