It looks like you are already trying to with:
<?php if (stripos($_SERVER['REQUEST_URI'],'index.php') !== false) {?>active<?php } ?>
Where else did you want to add it? or what isn't working the way you want? I would think code similar to the code you have would work.