LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   redirect https to http in apache (https://www.linuxquestions.org/questions/linux-software-2/redirect-https-to-http-in-apache-4175634115/)

sub320 07-15-2018 11:26 PM

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

bathory 07-16-2018 05:13 AM

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

sub320 07-18-2018 05:22 AM

Quote:

Originally Posted by bathory (Post 5879672)
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

TenTenths 07-18-2018 06:17 AM

Quote:

Originally Posted by sub320 (Post 5880629)
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.


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