When redirecting to HTTPS from www, index.php appears in URL
There are docs for removing index.php from your URLs here: https://craftcms.com/support/remove-index.php

There are also docs for enforcing SSL for all CP requests here: https://craftcms.com/support/force-ssl

Note that they mention the the SSL rewrite should happen before the index.php rewrite in your .htaccess file.