When I rewrite the rules it only works for https://mysite.com but breaks my website when I set it to redirect to https://www.mysite.com despite having the site accessible if you directly type https://www.mysite.com on the browser.
Found the solution here:
All you have to do is use the following command lines via root access and you're good to go.
solution: Root commands
useradd -g spamd -s /…