Added https redirect to production website.

This commit is contained in:
Greg Edwards
2021-02-15 00:44:43 -05:00
parent 8d539e85d5
commit 44f3d0b0ee
3 changed files with 26 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>http://pkmnclassic.net</SiteUrlToLaunchAfterPublish>
<SiteUrlToLaunchAfterPublish>https://pkmnclassic.net</SiteUrlToLaunchAfterPublish>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<MSDeployServiceURL></MSDeployServiceURL>

22
web/Web.Public.config Normal file
View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
</system.web>
<system.webServer>
<rewrite xdt:Transform="Insert">
<rules>
<rule name="Host and HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="^pkmnclassic\.net$" negate="true" />
<add input="{HTTPS}" pattern="OFF" />
</conditions>
<action type="Redirect" url="https://pkmnclassic.net/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

View File

@@ -3648,6 +3648,9 @@
<Content Include="Web.config">
<SubType>Designer</SubType>
</Content>
<None Include="Web.Public.config">
<DependentUpon>Web.config</DependentUpon>
</None>
</ItemGroup>
<ItemGroup>
<Compile Include="admin\AddBoxes.aspx.cs">