445 views

Site (URL Suffix) for CMS is case sensitive

 

Problem

The link to access a CMS site uses the following format:

https://<instance>.service-now.com/<site suffix>

The <site suffix> is defined by the URL Suffix field on the Site form.

A URL only redirects the user to the CMS Site if the <site suffix> case is entered correctly.

 

 

Symptoms

The following is reproducible:

  • https://<instance>.service-now.com/ESS ....directs to the standard non-CMS User Interface
  • https://<instance>.service-now.com/Ess .....directs to the standard non-CMS User Interface
  • https://<instance>.service-now.com/ess .....directs to CMS Site as expected

  

Cause
A problem record was created for this issue. Development confirmed the behavior and closed this problem noting there no plan to alter this behavior in any of the upcoming releases.

 


Resolution
As a result, careful consideration must be made when creating a custom CMS site and populating the URL Suffix field on the Site record.

However, the following solution can be used as a workaround (please note that this solution is provided as is and should be run at one's own risk as this is only provided as a demonstration on how to workaround this issue):

Create a global UI script:

API Name: Portal case insensitivity redirect 
Global: true 
Active: true 
Script: 
function portalRedirect() { 
if ((document.URL.indexOf('Ess') != -1) || (document.URL.indexOf('ESS')) != -1) { //replace ess with the site name and make sure to cover all cases (i.e. ESS, Ess, EsS, ESs, etc.)
window.location = '/ess/'; 


addLoadEvent(portalRedirect); 

Article Information

Last Updated:2018-07-05 14:50:46
Published:2018-07-05