Can't get URL Redirect to work for directing http to https

I've followed these 2 url instructions and still when I use http it doesn't get redirected.  Instead I would get HTTP 404 error that the resource is not found.  Attached is the web.config from the web server.  I tried both "pattern="off" and pattern="^OFF$"  and they both didn't work.  
Also, in IIS, SSL Setting, I unchecked the "Required SSL".
I also removed this line form the web.config file, "        "<httpRedirect enabled="false" destination="" />"
But that didn't help solve the problem either.  What is this line for?  It was right before the Rewrite Rules section.
I'm attaching the Rules from my web.config file here.

Thank you.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mohammed KhawajaManager - Infrastructure:  Information TechnologyCommented:
What you need to do is use IIS Rewrite URL.  Instead of listing the steps, follow the link below:
You have an error in your rule (there is a " right after your add input line).  This is the one I use without any problems:
        <rule name="HTTP to HTTPs" stopProcessing="true">
            <match url="(.*)" />
                <add input="{HTTPS}" pattern="off" />
            <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lapuccaAuthor Commented:
It_Saige, thank you for that correction.  I removed it and it still doesn't work.  I then copy and past in your code and still the same http 404 error. Both times I restarted the website in IIS just to make sure.    It's very odd.

Hi Mohammed, one of the 2 url that I followed the instruction is the same as what you listed and this one,   

The only difference in the end result code in web.config is at the pattern="off" or pattern="^OFF$f"  I tried both and neither fixed my http404 error.  Below is the full error I got:

Server Error in '/' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /apps/xxxx/AppDirectory.aspx
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

Mohammed KhawajaManager - Infrastructure:  Information TechnologyCommented:
Could you post a copy of your web.config
lapuccaAuthor Commented:
Attached is my web.config file, thank you.
You need to reupload the Web.config using a different extension.

lapuccaAuthor Commented:
Right, sorry about it.  Here it is.
I don' t see anything that really stands out.  You are not requiring SSL are you?Capture.JPG-saige-
lapuccaAuthor Commented:
No, I followed the instruction and turned that off by unchecking that checkbox that require SSL.  Below is the screen capture from the SSL setting for this site,
lapuccaAuthor Commented:
I think the SSL installed is the problem.  Thank you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.