Hi @yps104 ,
Here are the steps to do this:
1- Open Portal Management App
2- Navigate to Web Templates -> Header
3- Add this script at start.
{% if user %}
window.location.href='./profile';
{% else %}
<script>
if(window.location.href != "" && (window.location.href=="https://myportal.powerappsportals.com/" || window.location.href=="https://myportal.powerappsportals.com")){
window.location.href = "https://myportal.powerappsportals.com/SignIn";
}
</script>
{% endif %}
4- Replace myportal with your actual portal URL.
Feel free to share, if you face any issues.
Thanks,
Saud
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.