Brightspot CMS User Guide

Trailing slash behavior in URLs


The field Trailing Slash Configuration has three options: Do Not Change, Remove, and Normalize. This topic provides examples showing how those options affect the lookup process for asset requests.

Suppose your site has assets at the following URLs:

  • http://example.com/breakfast (permalink is /breakfast).
  • http://example.com/lunch/ (permalink is /lunch/, internally stored as /lunch/index).


The following table shows how Brightspot receives a requested URL and, depending on the value of Trailing Slash Configuration, determines the asset to return.

Requested URL
Returned asset
Do Not Change—Brightspot does not modify the URL of the requested asset.
http://example.com/breakfast Asset with permalink /breakfast.
http://example.com/breakfast/ There is no asset with permalink /breakfast/, so Brightspot returns a not found (error 404).
http://example.com/lunch There is no asset with permalink /lunch, so Brightspot returns a not found (error 404).
http://example.com/lunch/ Asset with permalink /lunch/.
http://example.com/dinner There is no asset with permalink /dinner, so Brightspot returns a not found (error 404).
http://example.com/dinner/ There is no asset with permalink /dinner/, so Brightspot returns a not found (error 404).
Remove—Brightspot removes a trailing slash unless an asset exists at the returned URL.
http://example.com/breakfast Asset with permalink /breakfast.
http://example.com/breakfast/ There is no asset with permalink /breakfast/, so Brightspot removes the trailing slash and returns the asset with permalink /breakfast.
http://example.com/lunch There is no asset with permalink /lunch, so Brightspot returns a not found (error 404).
http://example.com/lunch/ Asset with permalink /lunch/.
http://example.com/dinner There is no asset with permalink /dinner, so Brightspot returns a not found (error 404).
http://example.com/dinner/ There is no asset with permalink /dinner/, so Brightspot removes the trailing slash and attempts to return the asset with permalink /dinner. There is no asset with that permalink so Brightspot returns a not found (error 404).
Normalize—Brightspot adds or removes the trailing slash as necessary to match an existing URL.
http://example.com/breakfast Asset with permalink /breakfast.
http://example.com/breakfast/ There is no asset with permalink /breakfast/, so Brightspot removes the trailing slash and returns the asset with permalink /breakfast.
http://example.com/lunch There is no asset with permalink /lunch, so Brightspot adds the trailing slash and returns the asset with permalink /lunch/.
http://example.com/lunch/ Asset with permalink /lunch/.
http://example.com/dinner There is no asset with permalink /dinner, so Brightspot adds the trailing slash and attempts to return the asset with permalink /dinner/. There is no asset with that permalink, so Brightspot returns a not found (error 404).
http://example.com/dinner/ There is no asset with permalink /dinner/, so Brightspot removes the trailing slash and attempts to return the asset with permalink /dinner. There is no asset with that permalink, so Brightspot returns a not found (error 404).
Previous Topic
Configuring trailing slash behavior
Next Topic
Asset URLs
Tags
Was this topic helpful?
Thanks for your feedback.
Our robust, flexible Design System provides hundreds of pre-built components you can use to build the presentation layer of your dreams.

Asset types
Module types
Page types
Brightspot is packaged with content types that get you up and running in a matter of days, including assets, modules and landing pages.

Content types
Modules
Landing pages
Everything you need to know when creating, managing, and administering content within Brightspot CMS.

Dashboards
Publishing
Workflows
Admin configurations
A guide for installing, supporting, extending, modifying and administering code on the Brightspot platform.

Field types
Content modeling
Rich-text elements
Images
A guide to configuring Brightspot's library of integrations, including pre-built options and developer-configured extensions.

Google Analytics
Shopify
Apple News