added checks for index.htm and php