Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Mar 21, 2022
Jun 21, 2022
CMS Core
Closed, Acceptance tests pass
Currently, CMS pages with a simple URL have two page URLs: the full page URL and the simple URL. If simple URL format is preferred (RoutingOptions.PreferredUrlFormat = PreferredUrlFormat.Simple), then generated URLs will be in simple format. However, the full page URL is still accessible.
Ideally a request to the full page URL will result in a temporary redirect (HTTP 302 Found) to the simple URL, and this redirection behavior could be configurable.
Configuration
In Startup.cs
public void ConfigureServices(IServiceCollection services) { // omitted for brevity services.Configure<RoutingOptions>(o => o.PreferredUrlFormatRedirection = HttpRedirect.Permanent); }
There are three possible values for HttpRedirect:
You also can set through appsettings.json.