Announcement

Collapse
No announcement yet.

Forcing the use of HTTPS:// on your site

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Forcing the use of HTTPS:// on your site

    Does anyone know how to enforce https on a Windows server? It seems Linux systems can just add code the htaccess file but the process differs for Windows.

    #2
    In your web.config insert the followng code
    Code:
    <rule name="HTTP to HTTPS redirect" stopProcessing="true">
      <match url="(.*)" />
        <conditions>
          <add input="{HTTPS}" pattern="off" ignoreCase="true" />
        </conditions>
      <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
    </rule>
    Wise men say nothing Fools never listen

    Comment


      #3
      I tried the following in core/includes but it still shows unsecured content:

      Code:
      <!--
          This file is for IIS to block direct access to this directory to the webserver.
          This will not affect Apache (which has similar rules in the .htaccess file in this
          directory
      -->
      <?xml version="1.0" encoding="UTF-8"?>
      <configuration>
        <system.webServer>
        <rewrite>
                  <rules>
                      <rule name="HTTP to HTTPS redirect" stopProcessing="true">
                          <match url="(.*)" />
                          <conditions>
                              <add input="{HTTPS}" pattern="off" ignoreCase="true" />
                          </conditions>
                          <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
                      </rule>
                  </rules>
              </rewrite>
          <handlers>
            <add name="Deny" path="*" verb="*" type="System.Web.HttpForbiddenHandler" />
          </handlers>
        </system.webServer>
      </configuration>

      Comment


        #4
        I believe it should be in web.config file in the vB root directory.
        Helpful? Donate. Thanks!
        Buy me a coffeePayPal QR Code
        Fast VPS Host for vBulletin:
        A2 Hosting & IONOS

        Comment


          #5
          Thanks, I'll give it a shot.

          Comment


            #6
            Just to confirm, even if the site has a valid certificate and vBulletin options are set correctly, will adding an unsecure image to a module and displaying it on the homepage cause a mixed content message?

            Comment


              #7
              yes it will make sure all images has https instead of http
              Then try to find the images causing the the lock at the address bar not turning green saying it is secure is to click on the lock the go to more information select media this will show the image that is causing the problem
              Wise men say nothing Fools never listen

              Comment


                #8
                For user-generated content, it is inevitable that users would link to images using http and that will cause mixed content warning. To prevent that, you can block all mixed content

                So, I had my SSL broken today by mixed content. Turned out that a plugin that loads an external image all of a sudden no longer served from SSL. In order to fix
                Helpful? Donate. Thanks!
                Buy me a coffeePayPal QR Code
                Fast VPS Host for vBulletin:
                A2 Hosting & IONOS

                Comment


                  #9
                  willie53 glennrocksvb thanks again.

                  Comment

                  Users Viewing This Page

                  Collapse

                  There is 1 user viewing this forum topic.

                  • Guest Guest

                  Latest Posts

                  Collapse

                  Working...
                  X
                  Searching...Please wait.
                  An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

                  Please push the back button and reload the previous window.'
                  An unexpected error was returned: 'Your submission could not be processed because the token has expired.

                  Please push the back button and reload the previous window.'
                  An internal error has occurred and the module cannot be displayed.
                  There are no results that meet this criteria.
                  Search Result for "|||"