Redirect script for hugo website

Guys, morning!
Do anybody have script to redirect user to another page [i’m planning non https stub page] if he is visiting place using old browser?

That’s something your web server configuration should handle

I suppose that it should be something in java script to detect user agent and then upon this condition to do redirect.

While that may be possible, it’s unusual.

In case anyone has tried out solution please drop it here if it is possible

Not a Hugo related issue. Try Stack Overflow and the likes.

2 Likes

Hi, you haven’t described the situation exactly, so I’m just guessing, but:

what underlying issue are you dealing with ?
If it’s layout or html related, you should be able to style out / inactivate / eliminate from the DOM tree specific elements depending on browser configuration with media queries and feature queries. I never heard of having different pages for different browsers, because people just don’t do that and its pointless, especially today.