I want to host my website on CloudFront and guides suggest I will need to use uglyurls. I use the kube theme(https://themes.gohugo.io/kube/) and added menu items to it. They link to the correct page (e.g. localhost:1313/docs/index.html) but when I navigate there, I get redirected to “localhost:1313/docs/” instead.
baseURL = "https://my.page" languageCode = "en-us" title = "docs" theme = "kube" uglyurls = true [[menu.main]] name = "General" weight = -100 url = "/general/index.html" [[menu.main]] name = "User Documentation" weight = -100 url = "/docs/index.html"
when I curl the url:
curl -v localhost:1313/docs/index.html * Trying ::1... * TCP_NODELAY set * Connection failed * connect to ::1 port 1313 failed: Connection refused * Trying 127.0.0.1... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 1313 (#0) > GET /docs/index.html HTTP/1.1 > Host: localhost:1313 > User-Agent: curl/7.54.0 > Accept: */* > < HTTP/1.1 301 Moved Permanently < Location: ./ < Date: Fri, 06 Apr 2018 17:42:55 GMT < Content-Length: 0 < * Connection #0 to host localhost left intact
Is this a problem of my theme or with hugo? How do I change the behavior? I could not find any hard redirects in the theme I am using.