Control Web Panel
WebPanel => CentOS-WebPanel GUI => Topic started by: licode on December 13, 2022, 11:50:50 AM
-
I tried searching and looking around and found nothing for Apache.
How can I resolve this without htaccess files.
-
webserver--> mainconfig ?
-
webserver--> mainconfig ?
Nope, nothing related to https or force https there.
-
webserver--> mainconfig ?
Nope, nothing related to https or force https there.
goodluck then
-
It's possible to do a permanent redirect in the vhost config:
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
Redirect permanent / https://example.com/
</VirtualHost>
But a 301 redirect is preferred. In vhost conf or in .htaccess:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://example.com/$1 [L,R=301]