Current link not showing in sub-directory on self hosted site

I am not sure to what custom code you are referring to. I have a JS script to show/hide the navigation on scroll up/down but nothing which would affect the internal page linking.

My issue is most likely because of the /at/ folder and/or the html extensions. For some reason I am not able to remove the html extensions through the .htaccess file following the instructions in this thread: Internal links change to *.html after code export

Still, I don’t understand why putting my site in a sub-directory would cause this issue by not highlighting the “current” state.