if($_SERVER['SERVER_PORT'] == 443)
$_SERVER['HTTPS'] = true;
Sorry but this is not working for me.
I added wordpress extension in Magento & now URL is
which is not working (showing me The page isn’t redirecting properly)
Instead of it the following is working fine
Why this URL is not working without index.php
All other pages are working properly