Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7824461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:36:19+00:00 2026-06-02T08:36:19+00:00

Below is my web.config file. I want automatic redirection of http url to https.

  • 0

Below is my web.config file. I want automatic redirection of http url to https. I tried the follwing but it is not working.
IIS7 with SSL Required checked in SSL settings.
Can anyone help please.
Thanks

<configuration>
<configSections>
    <sectionGroup name="system.webServer">
        <sectionGroup name="rewrite">
            <section name="rewriteMaps" overrideModeDefault="Allow" />
            <section name="rules" overrideModeDefault="Allow" />
        </sectionGroup>
    </sectionGroup>
</configSections>
<system.webServer>
    <rewrite>
        <rules>
            <rule name="Redirect to HTTPS" enabled="true" stopProcessing="true">
                <match url="^(.*)$" />
                <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                    <add input="{HTTPS}" pattern="off" />
                </conditions>
                <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Found" />
            </rule>
        </rules>
    </rewrite>
    <defaultDocument>
        <files>
            <add value="index.asp" />
        </files>
    </defaultDocument>       
</system.webServer>
<system.web>
    <customErrors mode="Off" />     
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" />
</system.web>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T08:36:26+00:00Added an answer on June 2, 2026 at 8:36 am

    Uncheck the “Require SSL”– for the redirect to work, you have to accept the initial request on HTTP first.

    EDIT

    Second point. You’re selecting input based on HTTPS. You need to negate the condition like this:

    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
        <add input="{HTTPS}" pattern="off" negate="true" />
    </conditions>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to use the below Web-Service : https://acquirer.sb24.com/ref-payment/ws/ReferencePayment?WSDL and builded config file after
My config file is located here: ~/Admin/Web.config I tried opening it via the below
In my web.config file there are below entries. It seems like it is used
I want to keep some portions of the web.config file out of web.config file.
After I inserted the configuration below in my Web.Config <authentication mode=Forms> <forms name=appNameAuth path=/
I need some web.config examples for each expression types below : $number The last
please see web site below that i designed (it's from a template): http://noorjamali.soscharge.com my
I'm using the below headers on my web site but I'm running into a
I tried accessing web for xml parsing using the code below: System.Uri proxy =
I've create a custom configuration section in my web.config file for my 3.5 web

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.