$ hugo env
hugo v0.138.0-ad82998d54b3f9f8c2741b67356813b55b3134b9+extended windows/amd64 BuildDate=2024-11-06T11:22:34Z VendorInfo=gohugoio
GOOS="windows"
GOARCH="amd64"
GOVERSION="go1.23.2"
github.com/sass/libsass="3.6.6"
github.com/webmproject/libwebp="v1.3.2"
Problem Description
1.What you were doing or what you tried
I published my locally written blog to the server, allowing users to switch between Chinese and English when reading articles.
2.What you expected
When reading articles, the language switches normally.
3.What actually happened
While running hugo server locally, switching between Chinese and English works without issue. However, when I upload the public folder to the server, I encounter problems: it works fine in Chinese, but once I switch to English, it redirects incorrectly to localhost:xxxxx instead of the IP address.
Thank you very much for your reply.
I have tried the following steps, but I still can’t resolve the issue:
(1) Delete the public folder in the directory.
(2) Use the command: hugo server to generate the public folder.
(3) Upload the public folder to the server.