So I am almost finished moving a static site on to wordpress.
The old site structure was in the following format -
What I have managed to accomplish thus far.
I have all the images loaded in the database and doing the right thing in both wp-admin visual editor and on the pages.
Same for my JS and CSS files.
Created a theme for this site from scratch.
The way I handled my sub-directory index pages was to create a wp-category for each sub-directory. So what I have in wordpress is
categories for sub1, sub2, and sub3
I used custom permalink structure /%category%/%postname%.html
and created posts for each page and assigned the category.
For example I have page1 in category sub1. So the url becomes just as you would expect.
The solution I am working on involves creating category templates to handle the index.html for that category and redirecting canonical links to the category url.
For example, I have category-sub1.php.
in this file, I am running a loop that only shows content of a post that I have named sub1-index, and I am redirecting that page sub1-index.html to sub1 in .htaccess.
BUT When I request
http:/domain.com/sub2/index.html I am redirected to