edusoho在IIS10中配置伪静态

发布于 2018-01-09  3.99k 次阅读


edusoho是一款很好的开源的在线网络教育程序,今日用此程序搭建了一个站点,但是搭建完了之后除了首页能正常点击之外其他连接都无法正常访问,不用说肯定是伪静态出错了。我的环境是windows server2016+IIS10+宝塔,那么我看到官方解压出来的有附带htaccess文件,可是在我用IIS7中的URL Rewrite插件导入规则的时候发现出错。捣鼓了很久,整理了如下的IIS7可以用的伪静态规则,可以复制下面的到新建的文本文档中然后导入,这个是我找到写好的htaccess文件,然后再用IIS10中的URL Rewrite导入就可以了

# Defend your computer from some worm attacks

RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]

# we skip all files with .something except .html
RewriteCond URL .*\..+$
RewriteCond URL (?!.*\.html$).*
RewriteRule (.*) $1 [L]
# we keep the .php files unchanged
RewriteRule (.*\.php)(.*) $1$2 [L]

RewriteRule (.*) /app.php [L]


有些随风有些入梦