function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
David Benkoel 3David Benkoel 3 

URL Rewriter always redirect to login page


I’ve created a URL Rewriter class to a Digital Experience.

When I enter an URL into the browser, I can see from the logs that the this class is actually invoked.

My issue is, whatever PageReference is returned in the mapRequestUrl() method of this class, the browser keeps redirecting to the Community login page, that is, /s/login/.

Event if I code something like so, the behaiour remains the same:
global PageReference mapRequestUrl(PageReference friendlyURL) {
        return new PageReference('/s/login/SelfRegister/');

Does anyone have an ideao on what's happening here?

Thank you