Do you mind if I ask what the purpose of the subdirectory is? Are you trying to have one server have different instances of specify for people to use? If so, subdomains may be the solution, but sudomains would look like this:
https://subdomain.example.com
These work well, and is how specify cloud seperates out the different services on the specifycloud.org domain.
I don’t have as much experience configuring services that use the subdirectory approach, however there are some services that do work with that method. The one that comes to mind is mkdocs, in which the base url is configured as an environment variable, which can included a path. GitHub pages also seperates out different repositories within a organization through subdirectories, since it has already split up github.io subdomains among organizations/users.
I don’t think that subdirectories would work as well in specify due to how the urls are setup. For example, the specify route and favicons are coded as an absolute path, which I believe explains why you are experiencing the redirection the way you are.
I’ve received our new internal production server and will be migrating our SP-7 instances to it soon.
Our IT team suggested using a subdirectory structure for the setup, as it simplifies our internal domain management and SSL request process by requiring just one domain (ex: https://collections.cfs.nrcan.gc.ca) instead of several. For example: