I need to force all request to HTTPS rather than HTTP.
For that I have added the following code in to my .htaccess as can be seen below:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
This URL is forced to HTTPS: http://localhost/test
but this URL is not forced to HTTPS: http://localhost/test/public/assets/css/custom.css