SiteGenesis / Server-side JS / Module: controllers/RedirectURL

Controller that handles URL redirects.

It is called by the system to handle URL mappings (static mappings and mapping rules). The mappings are configured in Business Manager. This controller is highly performance critical, because it is frequently called in case of exploit scans.

Please follow these rules:

  • no or only a few database calls
  • simple (static) template response
  • caching the result page is a must


(static) Hostname

Used by the platform for URL redirects.


(static) Start

Gets a redirect and renders it.



(inner) hostName()

Hostname-only URLs ( cannot be redirected using the URL mapping framework. Instead, specify this controller in your site's hostname alias in Business Manager.

However, a redirect to the homepage is performed by the Default controller Start function. The hostname in the URL is the site's HTTP Hostname, if one is configured in Business Manager. Also, you can provide a URL to redirect to an optional parameter, Location.

Redirect http[s]:// to,,RedirectURL-Hostname,Location,

(inner) start()

Gets the redirect. Renders the template for a redirect (util/redirectpermanent template). If no redirect can be found, renders an error page (util/redirecterrorutil/redirecterror template).


X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.