Made index.php protocol agnostic