Help with https redirects in HTaccess

I’ve hit a problem I’ve never encountered before.

I’m trying to redirect https://www.domian.com to https://www.domain.co.uk. But failing.

I’ve got http://www.domian.com to https://www.domain.co.uk to work fine, but not when the .com address to be redirected includes the “s”.

Anyone any ideas?

Is this for a single link or an entire website? If it’s the latter, you probably need some kind of wildcard setup, but it should be possible to do this in cPanel without having to get your hands dirty with code.

Thanks, just found out I don’t think it can be done at HT level, the server guy did it at some other level, no idea which, but it works so it’s all good.

Thanks.

@steveb Not sure if this works in your case but maybe worth a try

https://www.htaccessredirect.net/