Navigation between pages in sub-folders

Good morning,
I have a problem with the linked NAVBAR component on all pages in subfolders.
The use of the ‘base’ HTML tag helps to remedy this problem.
But this is not convenient to switch between local use and published site.
What solutions do you recommend?