In DotnetNuke I made a website secure(https), and now it gives a 302 response code first, and then redirects to https

Running a DNN website. Made the entire website https instead of http. Now the first response code it gives me is 302. I need it to be 301 for the SEO purposes.
Do I do it in code? or in IIS? Cannot figure it out.
PLease tell me step-by-step how to implement that.
LVL 1
vituxaAsked:
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.

Brad GrouxSenior Manager (Wintel Engineering)Commented:
0
vituxaAuthor Commented:
PLease tell me how to write a rule in IIS

I added this rule in the IIS and it still 302s:
<rule name="[my 301 to 302]" stopProcessing="true">
            <match url="http://(.*)$" ignoreCase="true" />
            <action type="Redirect" url="https://{R:1}" redirectType="Permanent" />
          </rule>

Open in new window


PLease help!
0
Brad GrouxSenior Manager (Wintel Engineering)Commented:
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

vituxaAuthor Commented:
I am asking for help with either direct instructions or a code sample. PLease help me. I cannot figure this out.
0
vituxaAuthor Commented:
Brad thank you for trying. The below is what I was looking for:


<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="Permanent" url="https://{HTTP_HOST}/{R:1}" />
        </rule>
      </rules>
    </rewrite>

Open in new window

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
vituxaAuthor Commented:
My answer is the ACTUAL solution to the problem. Brad provided resources.
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.