How to require that all requests to a subdomain are via https

Category: Cpanel

kklipsch
Asked:
2013-02-14 12:13 pm EST

Hits: 423
I would like to force all requests to particular subdomain to go via the shared ssl certificate. Every time I've tried to set this up I get cyclical redirects.

[EDIT]
Note this is for the SHARED SSL certificate.

What I'd actually like to do is create a subdomain on my website that is protected by htaccess basic authentication and the authentication creditials are sent via https only.

If you do the redirect in the answer below it will still send the credentials via http because it authenticates before it rewrites. So I put a sub directory in the subdomain and password protect that.

When I try to access subdomain.mydomain.com/protected_sub/file.html I get a 404. I can access this file via the securexxx.inmotionhosting/~username/subdomain/protected_sub/file but it does not ask for authentication.
[EDIT]

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

johnpaulb-imhs1
Staff
8,741 Points
2013-02-14 12:21 pm EST
Hello kklipsch,

Thank you for your question. Here is a link to a helpful article here in our support center that explains how to force SSL using the .htaccess file.

This will cause all web traffic to access the site via the https address.

If you have any further questions, feel free to post them below, or contact live Tech Support.

They are available 24/7 via:
Email: support@inmotionhosting.com
Phone: 888-321-HOST (4678)
757-416-6575 (Intl.)
&
Chat (there is a link on the top right).

Thank you,

-John-Paul

You must login before you can post a comment about this answer.

Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!