LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-15-2018, 11:26 PM   #1
sub320
Member
 
Registered: Jan 2016
Posts: 116

Rep: Reputation: 3
redirect https to http in apache


I don't know is it suitable to ask question about web server redirect.

I use apache , run on linux 7

I have a domain do not have apply ssl cert , now when run https://my_domain , it will go to a dead link

what I want is when use type "https://my_domain" , it will go to http://my_domain .

What I need to do is use apache redirect function ? is it the best method ? if use this method , the browser will pop the warning message about the cert >

thanks
 
Old 07-16-2018, 05:13 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,167
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
Quote:
what I want is when use type "https://my_domain" , it will go to http://my_domain .
If you don't have a certificate, you should disable completely the SSL vhost.
You didn't say your distro exactly, but I guess you mean RHEL/Centos 7x. If that's the case read this.


Quote:
What I need to do is use apache redirect function ? is it the best method ? if use this method , the browser will pop the warning message about the cert >
You can also use mod_rewrite to redirect https to http, but in this case you'll get a warning about the invalid certificate.

Regards
 
Old 07-18-2018, 05:22 AM   #3
sub320
Member
 
Registered: Jan 2016
Posts: 116

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by bathory View Post
If you don't have a certificate, you should disable completely the SSL vhost.
You didn't say your distro exactly, but I guess you mean RHEL/Centos 7x. If that's the case read this.



You can also use mod_rewrite to redirect https to http, but in this case you'll get a warning about the invalid certificate.

Regards
"You can also use mod_rewrite to redirect https to http, but in this case you'll get a warning about the invalid certificate." <<== I am wonder why still have warning , if the page is redirected , the browser should directly go to http ( not https ) , why still have warning ?

thanks
 
Old 07-18-2018, 06:17 AM   #4
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,483

Rep: Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556
Quote:
Originally Posted by sub320 View Post
I am wonder why still have warning , if the page is redirected , the browser should directly go to http ( not https ) , why still have warning ?
Because the browser still has to make a full, validated (or in your case not) https connection to the server in order to get sent the redirect.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Redirect http to https: Apache Server LXer Syndicated Linux News 0 11-28-2017 08:42 AM
LXer: How to Redirect HTTP Traffic to HTTPS in Nginx and Apache LXer Syndicated Linux News 0 03-09-2017 12:54 PM
Apache and problem with redirect between HTTP and HTTPS tquang Linux - Server 8 02-07-2014 04:26 AM
Redirect HTTP to HTTPS: bates Linux - Server 4 10-01-2010 11:10 AM
redirect http to https awreneau Linux - Server 17 10-14-2008 09:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration