<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  https://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <!--
    For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.

    The following attributes can be set on the <httpRuntime> tag.
      <system.Web>
        <httpRuntime targetFramework="4.8" />
      </system.Web>
  -->
  <system.web>
    <compilation debug="false" strict="false" explicit="true" targetFramework="4.8"/>
    <httpRuntime targetFramework="4.5"/>
    <customErrors mode="Off"/>
  </system.web>
  <appSettings>
    <add key="ValidationSettings:UnobtrusiveValidationMode" value="None"/>
    <add key="dbConnectionString" value="server=localhost;User Id=absolutepr_user;password='A9RX@KhN1^(!YyN';Persist Security Info=True;database=absolutePR_db;Convert Zero Datetime=True"/>
    <add key="ProjectTitle" value="AbsolutePR"/>
    <add key="MailServer" value=""/>
    <add key="MailUsername" value=""/>
    <add key="MailPassword" value=""/>
    <add key="MailFrom" value="noreply@absolutepr.com"/>
    <add key="MailSSL" value="true"/>
    <add key="MailPort" value="465 "/>
    <add key="AdminEMail" value="admin@absolutepr.com.sg"/>
    <add key="websiteLink" value="http://absolutepr.com.sg/"/>
    <add key="ErrorLogEmail" value=""/>
    <add key="EnableErrorLogText" value="false"/>
    <add key="EnableErrorLogEmail" value="false"/>
    <add key="ErrorLogTxtDirectory" value="~/DevLogs"/>
    <add key="EnableErrorLogEventsViewer" value="false"/>
  </appSettings>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="Home">
          <match url="^AbsolutePR-Home-Integrated-PR-Media-Previews-Fashion-Shows-Event-Hosting/?$"/>
          <action type="Rewrite" url="Default.aspx"/>
        </rule>
        <rule name="Aboutus">
          <match url="^About-Us-Singapore-PR-Company-Social-Media-Management-Media-Interviews-Fashion-Shows/?$"/>
          <action type="Rewrite" url="AboutUs.aspx"/>
        </rule>
        <rule name="Contactus2">
          <match url="^Contact-Global-PR-Company-Creative-Content-Media-Trials-and-Reviews-Food-Tastings/?$"/>
          <action type="Rewrite" url="Contact.aspx"/>
        </rule>
        <rule name="Events">
          <match url="^Client-Global-Presence-Events-Management-Media-Drops-Fashion-Spread/?$"/>
          <action type="Rewrite" url="Clients.aspx"/>
        </rule>
        <rule name="OperatingHours">
          <match url="^Services-Media-Engagement-Digital-PR-Product-Features-Fashion-Collabs/?$"/>
          <action type="Rewrite" url="Services.aspx"/>
        </rule>
        <rule name="Rates">
          <match url="^Testimonial-Brand-Strategy-Traditional-PR-Products-Profiling-Branding/?$"/>
          <action type="Rewrite" url="Testimonial.aspx"/>
        </rule>
        <rule name="Gallery">
          <match url="^Track-Record-Corporate-Profiling-Product-Launches-KOL-Seedings-Celebrities-Endorsements/?$"/>
          <action type="Rewrite" url="Track_Record.aspx"/>
        </rule>
        <rule name="Photo-Gallery">
          <match url="^Track-Record-Influencer-Activator-Products-Placements-Experts-Columns-In-store-Trunk-Shows/([^/]+)/([a-zA-Z0-9_-]+)/?$"/>
          <action type="Rewrite" url="Track_Record_Details.aspx?id={R:1}"/>
        </rule>
        <rule name="Add www" patternSyntax="Wildcard" stopProcessing="true">
          <match url="*"/>
          <conditions>
            <add input="{HTTP_HOST}" pattern="www.absolutepr.com.sg" negate="true"/>
          </conditions>
          <action type="Redirect" url="http://www.absolutepr.com.sg/{R:1}"/>
        </rule>
        <rule name="https" enabled="false" stopProcessing="true">
          <match url="(.*)"/>
          <conditions>
            <add input="{HTTPS}" pattern="^OFF$"/>
          </conditions>
          <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther"/>
        </rule>
      </rules>
      <outboundRules>
        <rule name="Remove RESPONSE_Server">
          <match serverVariable="RESPONSE_Server" pattern=".+"/>
          <action type="Rewrite" value=""/>
        </rule>
        <rule name="Strict Transport" enabled="true">
          <match serverVariable="RESPONSE_Strict_Transport_Security" pattern=".*"/>
          <conditions>
            <add input="{HTTPS}" pattern="on" ignoreCase="true"/>
          </conditions>
          <action type="Rewrite" value="max-age=31536000"/>
        </rule>
      </outboundRules>
    </rewrite>
    <staticContent>
      <remove fileExtension=".woff"/>
      <mimeMap fileExtension=".woff" mimeType="application/octet-stream"/>
    </staticContent>
    <httpCompression directory="%SystemDrive%\websites\_compressed" minFileSizeForComp="1024">
      <scheme dll="%Windir%\system32\inetsrv\gzip.dll" name="gzip"/>
      <dynamicTypes>
        <add enabled="true" mimeType="text/*"/>
        <add enabled="true" mimeType="message/*"/>
        <add enabled="true" mimeType="application/javascript"/>
        <add enabled="true" mimeType="application/json"/>
        <add enabled="true" mimeType="application/json; charset=utf-8"/>
        <add enabled="false" mimeType="*/*"/>
        <add mimeType="text/css" enabled="true"/>
      </dynamicTypes>
      <staticTypes>
        <add enabled="true" mimeType="text/*"/>
        <add enabled="true" mimeType="message/*"/>
        <add enabled="true" mimeType="application/javascript"/>
        <add enabled="true" mimeType="application/json"/>
        <add enabled="true" mimeType="application/json; charset=utf-8"/>
        <add enabled="false" mimeType="*/*"/>
      </staticTypes>
    </httpCompression>
    <urlCompression doStaticCompression="true" doDynamicCompression="true"/>
    <httpErrors errorMode="Custom" existingResponse="PassThrough">
      <!-- Catch IIS 404 error due to paths that exist but shouldn't be served (e.g. /controllers, /global.asax) or IIS request filtering (e.g. bin, web.config, app_code, app_globalresources, app_localresources, app_webreferences, app_data, app_browsers) -->
      <remove statusCode="404" subStatusCode="-1"/>
      <error path="/notfound" responseMode="ExecuteURL" statusCode="404" subStatusCode="-1"/>
      <remove statusCode="500" subStatusCode="-1"/>
      <error path="/error" responseMode="ExecuteURL" statusCode="500" subStatusCode="-1"/>
    </httpErrors>
    <directoryBrowse enabled="false"/>
    <validation validateIntegratedModeConfiguration="false"/>
    <caching>
      <profiles>
        <add extension=".woff" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange"/>
        <add extension=".woff2" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange"/>
        <add extension=".eot" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange"/>
        <add extension=".otf" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange"/>
        <add extension=".ttf" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange"/>
        <add extension=".svg" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange"/>
        <add extension=".js" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange"/>
        <add extension=".jpg" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange"/>
        <add extension=".css" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange"/>
        <add extension=".png" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange"/>
      </profiles>
    </caching>
    <httpProtocol>
      <customHeaders>
        <remove name="X-AspNet-Version"/>
        <remove name="X-AspNetMvc-Version"/>
        <remove name="X-Powered-By"/>
        <add name="X-Frame-Options" value="sameorigin"/>
        <add name="X-Xss-Protection" value="1; mode=block"/>
        <add name="X-Content-Type-Options" value="nosniff"/>
        <add name="Feature-Policy" value="accelerometer 'none'; camera 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; payment 'none'; usb 'none'"/>
        <add name="Referrer-Policy" value="no-referrer"/>
        <add name="Content-Security-Policy" value="frame-ancestors"/>
      </customHeaders>
    </httpProtocol>
  </system.webServer>
</configuration>