change routes for pages
add basename and dir_name