Infocaster/UrlTracker

Multilingual redirects not working

ipsisPuckHolshuijsen opened this issue · 8 comments

Hi!

I am having issues with redirecting multilungual pages.

De dutch (default) works, but the english or german pages don't work. Not getting anything in the logs either.
Here's what is being set up:

I have 2 published nodes, and we need to redirect one to the other. As I have said, the Dutch version is working correctly, but the other languages are not being hit at all. Even if I unpublish the node, i get a 404 instead of being redirected to the other node.

My home has the culture and hostnames set for each language.

dutch: https://www.mysite.nl
english: https://www.mysite.nl/en
german: https://www.mysite.nl/de

I have tried to setup my redirect multiple ways:
original url: https://www.mysite.nl/de/oldpage/
original url: /de/oldpage/
original url /oldpage/

But when I visit one of those pages, no redirect is happening.
Here's a screenshot of one of my redirects.
image

I was hoping anyone could tell me if I am doing it wrong, and what I am doing wrong.
Or if this is a bug :)

I am running Umbraco 10.3.2 and UrlTracker 10.2.1

Thanks!

//Puck

Hi @ipsisPuckHolshuijsen ! Thank you very much for reaching out. Have you checked out the frequently asked questions on the wiki? There you can find detailed steps on how to debug your redirects.

Hi @D-Inventor ,

Yes, I have set my loglevels, but the weird thing is, my requested URL is not being shown in the logs.
I can see UrlTracker looking for the Umbraco URLS (viewlogs etc), but not my requested url on the front-end.

That's an interesting observation. Are you using some form of caching on your website? Do you serve your pages with caching headers?

Sorry for not responding anymore, was a bit busy with other stuff haha :)

Alright, I have checked the response headers, but they don't have any caching:
image

Here is the weird thing; locally it is working, but in the production environment it is not.
I have a checker that checks where you are from, and redirects you to your correct language. If I use incognito mode, and go the the English URL, I get redirected to the new (and correct) node in Dutch (which is how the checker works).

If I open a new incognito tab, first go to the english language, go to the english URL. I don't get redirected to the correct node.

If I turn off the checker and open a new incognito tab, and go the to english URL. I don't get redirected to the correct node.

As soon as the site is on another culture no redirect is happening.

I see, so locally it is working, but in production it is not. So let's explore some potential differences between the local and production environment.

How do you host your website? I see in the headers that the server is Microsoft-IIS. Do you use SSL offloading or a reverse proxy in production? Or perhaps a cdn? If so, then perhaps your middleware pipeline might be missing the forwarded headers middleware.

Do you have the domains / hostnames on your local environment similar to your production environment? In your first message you said:

My home has the culture and hostnames set for each language.

dutch: https://www.mysite.nl/
english: https://www.mysite.nl/en
german: https://www.mysite.nl/de

Would it be possible to try setting your hostnames to one of the following?

dutch: www.mysite.nl/
english: www.mysite.nl/en
german: www.mysite.nl/de

or

dutch: /
english: /en
german: /de

Alright, I've tried changing the culture and hostnames, but no luck unfortunately.

About the SSL offloading etc, I have to ask that to some other people. I will get back to you about that!

Hi @ipsisPuckHolshuijsen ! It's been a while since the last update. Have you been able to inquire your team about this issue?

Hi @D-Inventor , unfortunately I haven't got any answer from them which made me fix this a different way.
It was just about a couple of redirects which i added in a rewritemap.

Thanks for everything anyways!