Applies to Product - Power Pages
What’s happening?
Redirects for the home page in Power Pages are not functioning as expected, leading to failures in implementing 301 redirects for certain records.
Reason:
Redirects for the home page are not supported in Power Pages. This may also stem from custom configurations that do not align with the out-of-the-box (OOB) options provided by Microsoft.
Resolution:
Workaround for Home Page Redirects:
- Since redirects for the home page are not supported, use JavaScript for redirection.
- Edit the JavaScript file of the Home page in Visual Studio Code and add the following code: javascript window.onload = () => { window.location.href = 'https://learnnfp.org'; // Replace with the desired destination URL }
- After adding the code, save the file and go back to Power Pages to click "Sync".
- Ensure that for inbound URLs, only the partial URL of the web page is entered instead of the full URL. For example, if the URL is https://abcd.powerappsportals.com/Welcome-Page, only enter Welcome-Page into the Inbound URL.
