The reason "it is working" is because you are actually publishing to a Sub-
Directory,
not to a Sub-
Domain ... it is the very reason I mentioned the differences .... it was obvious (to me, anyway) that by mixing up the methods of publishing, and confusing the formatting is why you are experiencing the issues that you are.
-------------
* Review again the same referenced post offered above to understand how to properly create links to pages within a Sub-Domain vs. Sub-Directory as well:
Sub-
Domain:
http://subdomain.rootdomain.com/page1.html .. ..
Sub-
Directory:
http://www.rootdomain.com/subdirectory/page1.html
Review also the reasons to choose either as presented in the one thread mentioned above ... Sub-
Directory if you have similar content that would best be kept in "one single site" format (even though each 'section' can be created as a separate website and navigated to directly) to avoid being penalized by the Search Engines for "Duplicate Content" violation, and, Sub-
Domain for individual Search Engine values and ranking which naturally predicates the "site" has unique and non-duplicated Content.