How to change default landing page on portal

AbidSiddiqui
Tera Contributor

I have created a new portal /vp , I am using another site XYZ, I want when someone click on ServiceNow link on XYZ, it should redirect to /vp , it is currently redirecting to /sp (default portal).

I have tried one approach, created one UI script 

AbidSiddiqui_0-1730686189151.png

 

and called this UI script in JS include 

AbidSiddiqui_1-1730686316099.png

Now, when I am clicking on other pages like KB or any catalog item from external site it always redirecting me to homepage of sp rather than that kb or item on portal.
(Note - In script I have added /esc just for test, will change it later to /vp)


Please suggest how to approach this.


Thanks in advance.

3 REPLIES 3

PrashantLearnIT
Giga Sage

Hi @AbidSiddiqui 

 

You can try below these steps - 

 

1. Go to the sys_properties table and find the property glide.entry.page.script. Note, in some instances this property may need to be created. If that is the case, create it as a string-type property. In most instances, however, this will be set to new CMSEntryPage().getEntryPage() by default.

2. Set the property's value to new SPEntryPage().getLoginURL(). Once set, this property will cause the platform to invoke a script include called SPEntryPage to determine where users should go to log in so the next step is to configure that script include to point to your portal.

3. Open the SPEntryPage script include and edit line 22 by changing the "/sp/" to use the URL suffix for your portal instead of the default "sp".

 

Instead of sp use your custom portal suffix URL.

 

********************************************************************************************************
Please appreciate the efforts of community contributors by marking the appropriate response as the correct answer and helpful. This may help other community users to follow the correct solution in the future.

********************************************************************************************************
Cheers,
Prashant Kumar
ServiceNow Technical Architect


Community Profile LinkedIn YouTube Medium TopMate
********************************************************************************************************

Sakthi2
Giga Guru

Hi @AbidSiddiqui,

For URL redirection from old links you can add UI script. 

 

Please refer this - https://www.servicenow.com/community/developer-articles/redirect-pages-e-g-links-bookmarks-to-an-oth...

 

Let me know if you have questions.

 

mPlease, Mark this as correct answer if this fixed your issue.

 

 

Regards,

Sakthi Varun. H 

AbdulNow
Tera Guru

Hi @AbidSiddiqui I Hope you're doing well! Please check the default checkbox field on your newly created portal. Refer to the screenshot below (fourth column from the start).

 

Screenshot 2024-11-04 at 3.35.28 PM.png

 

Please appreciate the efforts of community contributors by marking the appropriate response as correct answer and helpful. This may help other community users to follow the correct solution in the future. Thank you!

 

Regards,

Wahid