Haproxy, Nginx and theme Deepthought giving a 301

I’m using Zola for the first time where I am deploying using Nginx behind a Haproxy reverse proxy.
I’m using the Deepthought theme as a result of watching the Jamstack YouTube videos.

My site works fine via zola serve but when deployed via Haproxy I get a problem.
When I request for example, https://zola.mydomain.uk/about/ I get a 301 request where the Nginx instance returns, https://zola.mydomain.uk:1234/about/ where the 1234 is the port number set in Nginx and used by the Backend in Haproxy.

If I change my theme to Tabi, this problem goes away.

I can mitigate the Deepthought issue by modifing the http-response in the Haproxy backend, thus:-

backend be_zolawebsite
mode http
http-response set-header location %[res.hdr(location),regsub(:1234/,/)] if { res.hdr(location) -m found }
server svr_zolawebsite localhost:1234 ssl verify none

My diagnosis seems to imply this is theme related, and a 301 request seems odd for an internal website page change.

I notice that Deepthought has not been updated for 3 years, whereas Tabi has been released in 2025, with an update last week.

Would I be advised to use the younger theme?

Is the use of a 301 for a page change usual for Zola websites?
Otherwise, is there some sort of interaction I’m not aware of for Zola & Deepthought?

Thanks

Are you running zola serve to serve your site? It’s a local development only server, it’s not meant to be ran publicly.

No I’m not. I am using zola build and copying all the files to a directory on the server running Nginx.

Found the solution….

navbar_items = [
{ code = “en”, nav_items = [
{ url = “$BASE_URL/”, name = “Home” },
{ url = “$BASE_URL/posts/”, name = “Posts” },
{ url = “$BASE_URL/tags/”, name = “Tags” },
{ url = “$BASE_URL/categories/”, name = “Categories” },
{ url = “$BASE_URL/about/”, name = “About Me” }
] },
]

In the above array, the urls must have a trailing slash, as shown.
Maybe that covers up a bug in the template, or the authors of the theme never used it via a reverse proxy. I guess the 301 was just coming from Haproxy or Nginx as the page without the trailing slash couldn't be found.