Relative Links with Extension-less URLs

空扰寡人 提交于 2019-11-29 17:01:24

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!