本帖最后由 haozi129820 于 2017-11-25 19:03 编辑
你好WIN2012 IIS8.5 宝塔面板如何开启强制HTTPS? 我用的是DISCUZ 刚配置了SSL不知如何强制HTTPS
以下是我的文件 麻烦大神帮忙改下强制HTTPS代码
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<remove name="php_5.2" ></remove>
<remove name="php_5.3" ></remove>
<remove name="php_5.4" ></remove>
<remove name="php_5.5" ></remove>
<remove name="php_5.6" ></remove>
<remove name="php_7.0" ></remove>
<remove name="php_7.1" ></remove>
<add name="php_5.6" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:\BtSoft\WebSoft\php\5.6\php-cgi.exe" resourceType="Unspecified" requireAccess="Script" ></add>
</handlers>
<rewrite>
<rules>
<rule name="portal_topic">
<match url="^(.*/)*topic-(.+).html\?*(.*)$" ></match>
<action type="Rewrite" url="{R:1}/portal.php\?mod=topic&topic={R:2}&{R:3}" ></action>
</rule>
<rule name="portal_article">
<match url="^(.*/)*article-([0-9]+)-([0-9]+).html\?*(.*)$" ></match>
<action type="Rewrite" url="{R:1}/portal.php\?mod=view&aid={R:2}&page={R:3}&{R:4}" ></action>
</rule>
<rule name="forum_forumdisplay">
<match url="^(.*/)*forum-(\w+)-([0-9]+).html\?*(.*)$" ></match>
<action type="Rewrite" url="{R:1}/forum.php\?mod=forumdisplay&fid={R:2}&page={R:3}&{R:4}" ></action>
</rule>
<rule name="forum_viewthread">
<match url="^(.*/)*thread-([0-9]+)-([0-9]+)-([0-9]+).html\?*(.*)$" ></match>
<action type="Rewrite" url="{R:1}/forum.php\?mod=viewthread&tid={R:2}&extra=page%3D{R:4}&page={R:3}&{R:5}" ></action>
</rule>
<rule name="group_group">
<match url="^(.*/)*group-([0-9]+)-([0-9]+).html\?*(.*)$" ></match>
<action type="Rewrite" url="{R:1}/forum.php\?mod=group&fid={R:2}&page={R:3}&{R:4}" ></action>
</rule>
<rule name="home_space">
<match url="^(.*/)*space-(username|uid)-(.+).html\?*(.*)$" ></match>
<action type="Rewrite" url="{R:1}/home.php\?mod=space&{R:2}={R:3}&{R:4}" ></action>
</rule>
<rule name="home_blog">
<match url="^(.*/)*blog-([0-9]+)-([0-9]+).html\?*(.*)$" ></match>
<action type="Rewrite" url="{R:1}/home.php\?mod=space&uid={R:2}&do=blog&id={R:3}&{R:4}" ></action>
</rule>
<rule name="forum_archiver">
<match url="^(.*/)*(fid|tid)-([0-9]+).html\?*(.*)$" ></match>
<action type="Rewrite" url="{R:1}/index.php\?action={R:2}&value={R:3}&{R:4}" ></action>
</rule>
<rule name="plugin">
<match url="^(.*/)*([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+).html\?*(.*)$" ></match>
<action type="Rewrite" url="{R:1}/plugin.php\?id={R:2}:{R:3}&{R:4}" ></action>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
|
|