I have set the addTrailingSlashesToUrls
option in the config file config/general.php
as below:
<?php
/**
* General Configuration
*
* All of your system's general configuration settings go in here. You can see a
* list of the available settings in vendor/craftcms/cms/src/config/GeneralConfig.php.
*
* @see \craft\config\GeneralConfig
*/
use craft\helpers\App;
return [
// Global settings
'*' => [
// Default Week Start Day (0 = Sunday, 1 = Monday...)
'defaultWeekStartDay' => 1,
'enableTemplateCaching' => false,
// Whether generated URLs should omit "index.php"
'omitScriptNameInUrls' => true,
// Control Panel trigger word
'cpTrigger' => 'admin',
// The secure key Craft will use for hashing and encrypting data
'securityKey' => App::env('SECURITY_KEY'),
// Whether to save the project config out to config/project.yaml
// (see https://docs.craftcms.com/v3/project-config.html)
'useProjectConfigFile' => false,
'addTrailingSlashesToUrls' => true,
],
// Dev environment settings
'dev' => [
// Dev Mode (see https://craftcms.com/guides/what-dev-mode-does)
'devMode' => false,
],
// Staging environment settings
'staging' => [
// Set this to `false` to prevent administrative changes from being made on staging
'allowAdminChanges' => true,
],
// Production environment settings
'production' => [
// Set this to `false` to prevent administrative changes from being made on production
'allowAdminChanges' => true,
],
];
And now I expect to be able to visit sitename.test/recipes
and have it redirect to sitename.test/recipes/
but it doesn't.
Have I missed something?