http -https redirection & Cyber Panel

when i spun a OLS on EC2 in aws, i was asked if i want to force rewrite http to https, but seems http to https redirection does not work. can someone tell me how i can do it in ubuntu ec2 machine without cpanel/cyberpanel? without affecting site and seo etc. (not sure, just read that google hates redirects)

Also, can someone advise if i can still install OPEN cyberpanel version without 2gb ram limit ?

Many thanks in advance!

Hello Cold-Egg
thank you so much! Need more help :)
1. Url : in the attached image. (sorry don't want google to land visitors to this thread so including in image)
2. I have rewritten the conditions which seems working fine but now getting certificate warning "says www not included" but it is, i look at the server config is there (i remember while setting up the server also it said, www will be automatically included). (again in the image) - is so, how can I re-issue cert in ubuntuOLS image (amzon ami)
3. I have installed Wordpress and a website, can I still install cyber panel without affecting it? if yes, will it be cyber panel ent (sais 2gb memory limit - though you have clarified it, just trying to confirm) or is there an open version?

URL rewrite code: (i need, and to redirect to - may be if something is wrong in below code - you can help)

RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]

1592597077112.png 1592597132340.png
Last edited: