• 10
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Enable SSL on wordpress site hosted on Azure

I have a website running on Azure and its a wordpress site. from the Azure Documentation what they say is to just copy and past the example in web.config file

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="Force HTTPS" enabled="true">
          <match url="(.*)" ignoreCase="false" />
          <conditions>
            <add input="{HTTPS}" pattern="off" />
          </conditions>
          <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>

i copied this just the rule part in my existing web.config file. But the site didnt even loaded it gave an error on loading. Where as i have already added ssl, webiste is running on evercam.io and https://www.evercam.io. What i need is when ever someone go for evercam.io or else it should be going on HTTPS link not simple one.

My running config file is

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpCompression directory="%SystemDrive%\inetpub\
temp\IIS Temporary Compressed Files">
  <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll"/>
  <dynamicTypes>
    <add mimeType="text/*" enabled="true"/>
    <add mimeType="message/*" enabled="true"/>
    <add mimeType="application/javascript" enabled="true"/>
    <add mimeType="*/*" enabled="false"/>
  </dynamicTypes>
  <staticTypes>
    <add mimeType="text/*" enabled="true"/>
    <add mimeType="message/*" enabled="true"/>
    <add mimeType="application/javascript" enabled="true"/>
    <add mimeType="*/*" enabled="false"/>
  </staticTypes>
</httpCompression>
<urlCompression doStaticCompression="true" doDynamicCompression="true"/>
<rewrite>
  <rules>              
    <rule name="Imported Rule 1" stopProcessing="true">
      <match url="^(.*)$" />
      <conditions logicalGrouping="MatchAll">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
        <add input="{REQUEST_FILENAME}.php" matchType="IsFile" ignoreCase="false" />
      </conditions>
      <action type="Rewrite" url="{R:1}.php" />
    </rule>
    <rule name="Remove WWW" patternSyntax="Wildcard" stopProcessing="true">
      <match url="*" />
      <conditions>
        <add input="{CACHE_URL}" pattern="*://www.*" />
      </conditions>
      <action type="Redirect" url="{C:1}://{C:2}" redirectType="Permanent" />
    </rule>
    <rule name="Show vendors list" stopProcessing="true">
      <match url="^/?vendors/$" ignoreCase="true" />
      <conditions logicalGrouping="MatchAll">
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
      </conditions>
      <action type="Rewrite" url="/vendors.php" />
    </rule>
    <rule name="Show vendor details" stopProcessing="true">
      <match url="^/?vendors/([^/]+)$" ignoreCase="true" />
      <conditions logicalGrouping="MatchAll">
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
      </conditions>
      <action type="Rewrite" url="/vendors.php?{R:1}" />
    </rule>
    <rule name="Show models list" stopProcessing="true">
      <match url="^/?models/$" ignoreCase="true" />
      <conditions logicalGrouping="MatchAll">
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
      </conditions>
      <action type="Rewrite" url="/models.php" />
    </rule>
    <rule name="Show model details" stopProcessing="true">
      <match url="^/?models/([^/]+)$" ignoreCase="true" />
      <conditions logicalGrouping="MatchAll">
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
      </conditions>
      <action type="Rewrite" url="/models.php?{R:1}" />
    </rule>
    <rule name="Show public assets summary" stopProcessing="true">
      <match url="^/?public/$" ignoreCase="true" />
      <conditions logicalGrouping="MatchAll">
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
      </conditions>
      <action type="Rewrite" url="/public/index.php" />
    </rule>
    <rule name="Show public camera details" stopProcessing="true">
      <match url="^/?public/cameras/([^/]+)$" ignoreCase="true" />
      <conditions logicalGrouping="MatchAll">
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
      </conditions>
      <action type="Rewrite" url="/public/cameras/?{R:1}" />
    </rule>
  </rules>
</rewrite>
<staticContent>
  <clientCache cacheControlMaxAge="28.00:00:00" cacheControlMode="UseMaxAge"/>
  <remove fileExtension=".woff" /> <!-- In case IIS already has this mime type -->
  <remove fileExtension=".json" /> <!-- In case IIS already has this mime type -->
  <remove fileExtension=".mp4" /> <!-- In case IIS already has this mime type -->
  <remove fileExtension=".svg" /> <!-- In case IIS already has this mime type -->
  <mimeMap fileExtension=".json" mimeType="application/json" />
  <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
  <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
  <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
</staticContent>
<caching>
  <profiles>
      <add extension=".php" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="00:01:00:00" />
      <add extension=".ttf" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="28:00:00:00" />
      <add extension=".gif" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="28:00:00:00" />
      <add extension=".jpg" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="28:00:00:00" />
      <add extension=".png" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="28:00:00:00" />
      <add extension=".js" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="28:00:00:00" />
      <add extension=".css" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="28:00:00:00" />
  </profiles>
</caching>
<httpProtocol>
    <customHeaders>
    <remove name="Vary"></remove>
    <add name="Vary" value="Accept-Encoding"></add>
    </customHeaders>
  </httpProtocol>
<httpErrors>
    <remove statusCode="404" subStatusCode="-1" />
    <error statusCode="404" prefixLanguageFilePath="" path="/404.php" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
</configuration>

any help will be appreciated thanks

Trending Tags