My server is Ubuntu
I have following .htaccess –
# Disable directory browsing
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
My .conf file in /etc/apache2/sites-available/
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/example.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
</VirtualHost>
</IfModule>
When I add Redirect permanent / https://www.example.com to the .conf file, I get error “Too many redirects …”
Why the server is looping while resolving Redirect permanent?
What configuration can I have to get all my traffic to https://www.eperssona.com?
I tried –
Redirect permanent / https://www.example.com
Expecting all the traffic to go to https://www.example.com
It instead resulted in too many redirects