Portal redirection post URL Suffix change

Vijay Baokar
Kilo Sage

Hi Everyone,

Recently i have encountered with scenario where i need to change the URL Suffix from x to y. Now issue is if users have bookmarked the kb articles which are referring to "x" URL suffix then how can i route users to "y" URL Suffix portal for the same kb article as soon as they click on the same bookmark again.

 

I need to change the redirection to new portal which has "Y" URL Suffix.

 

 

1 ACCEPTED SOLUTION

@Onkar Pandav 

 

I had fixed this issue with below code:

 

var currentURL = window.location.href;
var newURL = currentURL.replace("x", "y");
window.location.href = newURL;

View solution in original post

3 REPLIES 3

Mark Manders
Mega Patron

Maybe this article can help: https://www.servicenow.com/community/now-platform-blog/6-ways-to-set-up-your-service-portal-for-redi...


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Onkar Pandav
Tera Guru

Hi Vijay,

Check below link that may help you to achieve the requirement.

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

@Onkar Pandav 

 

I had fixed this issue with below code:

 

var currentURL = window.location.href;
var newURL = currentURL.replace("x", "y");
window.location.href = newURL;