To enable [SSL on PHP](https://www.cloudways.com/blog/add-ssl-certificates-to-custom-php-sites/), you need to install the SSL certificate. If you are doing it using Cloudways, then you can either enable Free SSL by Let's Encrypt on one click from the settings or install custom SSL.
```
<Files ~ "^\.(htaccess|htpasswd)$">
deny from all
</Files>
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(.well-known[/]acme-challenge[/]yoururl)$ index2.php [NC,L] # Handle product requests
```