Rewrite Rules Apache Problems

i Have Subdomain, I want in my serverconfig from http to https and non www to www. I use Lets Encrypt. On one side one comes only with a certain url, from which then a Random url is generated. my previous normal config looks like this but without ssl and without www.

RewriteRule ^123/456/789/$  start.php [l]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ startsite.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$         %{REQUEST_URI}/index.php [L,NC]
Order allow,deny
allow from all