Redirect HTTPS to HTTP on a VPS account

Category: Ssl

thenorrisgroup
Asked:
2012-02-15 1:45 am EST

Hits: 3,305
An older version of one of our sites used HTTPS. The current version does not. Some people still have our old links, however. How do we redirect people who visit using https://domain.com/* to http://www.domain.com/*

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

You must login before you can submit an answer.

OTHER ANSWERS

0

BradM
Staff
2,760 Points
2012-02-15 9:43 am EST
Hi thenorrisgroup,


Option 1. If you will keep your SSL Certificate

We have an article here on how to force https, however you're actually trying to do the opposite.

You can take that example code and modify is slightly so that it forces https to http:
RewriteEngine On
RewriteCond %{SERVER_PORT} 443
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]


You will simply need to add the above code to your .htaccess file.


Option 2. You will be canceling / not renewing your SSL certificate.

After much research, I've learned that the SSL connection is made before Apache can process any rewrite rules. What this means is that if you don't have a valid ssl certificate, your user's browser will issue them some type of SSL Warning before Apache will even force the https to http redirect.

Without an SSL certificate, you will not be able to force https to http.


I hope this helps answer your question. If you have any further questions, feel free to update your question or post a comment on this page.

Did you know with a VPS you can modify your Apache settings to how you want it setup? Click here to learn more about what make InMotion Hosting a great VPS solution.

Thanks!
- Brad

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

Like this Question?
Write New!
Do you want to publish a tutorial to our support center?

News / Announcements

SSL Certficate Warnings
Updated 2014-04-14 11:34 am EST
Hits: 2004
Heartbleed 0-day OpenSSL security bug
Updated 2014-04-14 04:43 pm EST
Hits: 5279

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!