Why staight forward from local to remote in FF/Chrom

Hi all,
for a long time, I had a nice running setting with local dev using http://localhost:1313 and production with https://www.xlateral.com/de/

Since some time, when opening http://localhost:1313, FF or Chrome forward me straight from
http://localhost:1313 to https://www.xlateral.com/de/

Q: how can I prevent this behaviour? I need als always one local dev and one remote web window to work and test the app,

Does someone have a hint for me? Thank you!

Best
Ueli

localhost:1313 can only be used with a locally running hugo server. So, is hugo server running when you go to localhost:1313?

Thank you for the feedback. Yes, all is properly running. The “localhost:1313” is provided by the running hugo server in the command prompt window.

Then you might want to post a link to your repository so people can reproduce your situation.

From my experience hugo is deterministic with that.

So i assume you changed something some time ago. Any hint what?

Add multilingual,

Maybe updated hugo?

Since 123.0 hugo renders to disk per default. So a parallel execution of hugo and hugo server may behave strange…

Thank you for your feedback. This are my thoughts and tries too so far. I’m using current versions as possible.But it could be also a browser security thing with http.

Thats why I will dig in deeper systematically on my own. But probably someone come around who knows this behavior already. So, to save time from all.

I think you have the following option enabled: defaultContentLanguageInSubdir: true.

And that the default language is de.

This redirects the home page to the directory /de/ and Hugo uses an absolute address ( https://www.xlateral.com/).

I think if you try http://localhost:1313/de/, you’ll be fine :slight_smile:

Thank you for your help. Yes! It’s the auto generated root index.html.
I found the place to consider.

So this Commandline does the job:
hugo.exe server -b --baseUrl http://localhost:1313/

Thank you all!
Ueli

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.