Redirect working but not route


I’d like to route an url to a folder
This folder is static html content.

When I define a redirect in configuration->site it is working as expected, when you type you are redirected to the folder with a visible changed URL.

But when I try to route it, it gives me a 404. However I defined redirect or routing the same way with:
/2022/le-replay: /2022-le-replay/

Do you know what I am doing wrong?

Redirect physically redirects you. Routing approach doesn’t know you want to load a physical folder and it still tries to load a page on /2022-le-replay, which does not exist. Redirect and re-route are two completely different things and should be used depending on what you actually need

OK thanks. I would like to display the content of the /2022-le-replay/index.html page when accessing the /2022/le-replay url. That’s why redirect is not good in this case and I was expecting route to be the solution…

I tried as well editing .htaccess at the root level with RewriteRule ^/2022/le-replay$ /2022-le-replay/ [L] but it didn’t work…

Was about to suggest .htaccess, but if it didn’t work, then don’t know. I’m no good at configuring servers and similar stuff :slight_smile:

Hi @Nix through the internal mechanism in user/system/site.yaml I managed sometimes ago and it was working perfectly (old discuss)
have you try something like
/2022/le-replay/*.htm : /$1-$2/*.htm