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

Hi,
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.
HTTP.txt
lapuccaAsked:
Who is Participating?
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:

http://www.jppinto.com/2010/03/automatically-redirect-http-requests-to-https-on-iis7-using-url-rewrite-2-0/
0
it_saigeDeveloperCommented:
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:
<rewrite>
    <rules>
        <rule name="HTTP to HTTPs" stopProcessing="true">
            <match url="(.*)" />
            <conditions>
                <add input="{HTTPS}" pattern="off" />
            </conditions>
            <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />
        </rule>
    </rules>
</rewrite>

Open in new window

-saige-
0

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, https://www.sslshopper.com/iis7-redirect-http-to-https.html   

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
0
Hey MSSPs! What's your total cost of ownership?

WEBINAR: Managed security service providers often deploy & manage products from a variety of solution vendors. But is this really the best approach when it comes to saving time AND money? Join us on Aug. 15th to learn how you can improve your total cost of ownership today!

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

-saige-
0
lapuccaAuthor Commented:
Right, sorry about it.  Here it is.
Web.txt
0
it_saigeDeveloperCommented:
I don' t see anything that really stands out.  You are not requiring SSL are you?Capture.JPG-saige-
0
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,
ssl.jpg
0
lapuccaAuthor Commented:
I think the SSL installed is the problem.  Thank you.
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.