added case where index page is not at the root but a path: rename post_name
added case where index page is not at the root but a path: rename post_name

epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp