https redirect in web.config gives "500" error

Without a web.config file in the folder, when I browse to a file in that folder "", everything works.  Of course it is not secure (http).  I can also go to "" and I am successful (I get a little lock on the browser bar and the SSL cert properties can be displayed)

I want to create a standard-issue "https redirect" in a web.config file, which appears below.  

I copy the web.config file to that folder.  Then, when I browse to "", I believe it should re-write the address as "https" and bounce me to "", but I get an error:
 500 - Internal server error.
   There is a problem with the resource you are looking for, and it cannot be displayed

So, is there a problem in my web.config file, or do you think there is a problem elsewhere?

<?xml version="1.0" encoding="utf-8"?>
                <remove name="Redirect to HTTP" />
                <rule name="Redirect to HTTPS" enabled="true" stopProcessing="true">
                    <match url="(.*)" />
                            <add input="{HTTPS}" pattern="^OFF$" />
                        <action type="Redirect" url="https://{ToLower:{HTTP_HOST}{REQUEST_URI}}" appendQueryString="false" redirectType="Permanent" />

Open in new window

Rob RudloffIT Development SpecialistAsked:
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.

try  <clear\> in place of <remove name="Redirect to HTTP" /> and see if it works.

Just to know it is conflicting with any other rules
Rainer JeschorCommented:
which OS / which IIS version?

If it is IIS 7 (or higher) - have you installed the URL rewrite modul?

For the error 500 - any further info / detailed error message in the Windows event log?

Thanks and HTH

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
Rob RudloffIT Development SpecialistAuthor Commented:
Rainer -- you are awesome!
The URL rewrite module was missing on this server.  (I never even thought to look, I'm so used to it already being there.)
I installed the module and everything works great now.
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

From novice to tech pro — start learning today.