I tried searching and looking around and found nothing for Apache.
How can I resolve this without htaccess files.
webserver--> mainconfig ?
Quote from: PakPos on December 13, 2022, 07:17:23 PM
webserver--> mainconfig ?
Nope, nothing related to https or force https there.
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]