I’m trying to configure my Apache Server to redirect both:
Non-SSL http://support.nile.sd
and SSL https://support.nile.sd
to the link https://support.nile.sd/otrs/customer.pl
, HTTP requests are well redirected via this force-redirect.conf
:
$ vim /etc/httpd/conf.d/force-redirect.conf
<VirtualHost *:80>
ServerName support.nile.sd
Redirect permanent / https://support.nile.sd/otrs/customer.pl
</VirtualHost>
But HTTPS aren’t redirected!! it goes to a strange page as follows:
Index of /
Name Last modified Size Description
Could you please tell me how to redirect HTTPS also, without having the “Too many redirects ERROR”
2
Answers
Now it works, I used the RedirectMatch expression, on both HTTP and HTTPS Virtual hosts as follows in the same
force-redirect.conf
file:You only have a rule for port 80, which is regular http:// protocol
I don’t see a rule for port 443, which is https
you need to add the following