Hi,
I'm trying to redirect everything from non-www to www and using https, for example:
example.com to https://www.example.com
www.example to https://www.example.com
I'm doing the changes in Configuration / Virtual Hosts / Rewrite
This works:
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
However, I want to use Redirect permanent
So I tried:
ServerName example.com
ServerAlias www.example.com
Redirect permanent / https://www.example.com/
Unfortunately, I got www.example.com redirected you too many times.
I read https://www.litespeedtech.com/support/forum/threads/rewrite-problem.3491/#post-17355 and it seems it might be a bug, is there a way to use Redirect permanent in Configuration / Virtual Hosts / Rewrite to make it work?
Thank you!
I'm trying to redirect everything from non-www to www and using https, for example:
example.com to https://www.example.com
www.example to https://www.example.com
I'm doing the changes in Configuration / Virtual Hosts / Rewrite
This works:
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
However, I want to use Redirect permanent
So I tried:
ServerName example.com
ServerAlias www.example.com
Redirect permanent / https://www.example.com/
Unfortunately, I got www.example.com redirected you too many times.
I read https://www.litespeedtech.com/support/forum/threads/rewrite-problem.3491/#post-17355 and it seems it might be a bug, is there a way to use Redirect permanent in Configuration / Virtual Hosts / Rewrite to make it work?
Thank you!