After extensive tests with both this website and another one that also uses URL routing, I'm finally able to define what is happening.
I'm going to describe the way this site behaves on the hosting account as "normal". It's the same way my other site works on both the hosting account AND when run on my desktop. (Although the other site doesn't use relative links this way.)
The odd case out is when I run the new site on my desktop. The browser automatically appends "/" to my routed URLs, as though they are directories.
And the reason it does this is because I have created physical directories with the same names! If I delete the physical directory, it treats the URL as a reference to a file.
So the main problem for me is that I developed the site while testing with this odd case. Therefore, the solution is either A) make sure "/" is appended to all these links so they are considered directories, or B) alter the directory structure I've designed.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…