Added front page check and renamed variable to accept any path or url.