HTTPS address is not showing enything

Hello,
I implemented SSL into my portal according to tutorials:

  • I implemented SSL. My SSL key is self-signed;
  • I created the .htaccess file into htdocs folder and I added the content:
    RewriteEngine On
    RewriteCond %{HTTPS} !on
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

And now, if I put into browser address to my test file:

The page isn’t redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

This problem can sometimes be caused by disabling or refusing to accept cookies.

Please help me to get my page visible.

Can you please try these .htaccess rules instead?

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}