I assume you're trying to eliminate the necessity to include ?main_page=index in URL when accessing the front page, right? In that case, simply check for isset($_GET['main_page']), and if it is not set, assume index is requested.
Or if you wish to visibly redirect (coupled with above):
if ($_GET['main_page']=='index') {
header ('Location: http://yourdomain.com');
exit;
}