How to redirect old portal to new portal by giving new portal link in the old theme header?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2023 12:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2023 12:17 AM
You can replace Theme of old portals. Theme allows to include JS Includes, which will be loaded on attempt to display of every URL of old portals. Thus, you can create UI Script, which makes redirection to new portal, and load it as part of "Redirection Theme", which you assign to all old portals. The code of UI script can look as following:
(function () { var loc = window.location; //var oldUrl = loc.protocol + "//" + loc.host + loc.pathname + loc.search + loc.hash; var newUrl = loc.protocol + "//" + loc.host + "/newPortal" + newSearch + loc.hash; window.location.replace(newUrl); })();
The method location.replace allows to redirect to new URL in very clean way. The current page will not be saved in session History, meaning the user won't be able to use the back button to navigate to it. As the result users will be able to use old links (for example links from old emails) and access to new URLs instead of old one. You can make the above code more complex and implement more complex algorithm of replacing of old URL to new one.
View solution in original post
If my answer solved your issue, please mark my answer as ✅Correct & 👍Helpful based on the Impact
Thanks,
Manjusha Bangale
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2023 05:48 AM
Hi Manjusha,
I want this particular scenario only when users clicks on Notification Links(URI_REF). should go to new portal(ESC).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2023 05:14 AM
Hi there,
Not sure, though maybe this helps:
- 2021-09-27 - Article - Redirect (inactivate) Service Portal, e.g. from /sp to /esc
Kind regards,
Mark
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2023 01:13 AM