Good day to all! I have a problem with redirect in GRAV. I have read documentation, but in the chapter “redirects” there are no information about in what file I should to write the rule for redirect. I tried to write redirect in the header of the page “default.md”, in the file ‘site.yaml’ and in the ‘system.yaml’, but it didn’t work:
I can visit the page “/tutorial/algebra/fractions” without redirecting to the page ‘/tutorial/algebra/fractions/theory’. Tell me please, where I made a mistake?
The docs do say “you can override or add any of your own settings by editing the user/config/site.yaml file” under the heading “Site Level Routes and Redirects”. You must have missed that.
If it’s still not working, could you expand on what “it didn’t work” means exactly i.e. what is happening?
But I didn’t want to make separate page on site for the chapter “Fractions”. When user cliks on “Fractions” it has to redirect to the “Fractions\Theory”. So I wrote the rule for routing in the header of the file “Tutorial/01.algebra/01.fractions/default.md”
It worked, but another problem appeared. I suddenly found that the page “/tutorial/algebra/fractions/theory” opens on the link “/tutorial/algebra/fractions/theory/theory”, and the page “/tutorial/algebra/fractions/practice” opens by the link “/tutorial/algebra/fractions/theory/practice”. I was really surprised, because I wrote the rule for routions only for one page. After that happened I tried to found the rule for redirect I wrote redirect in the file default.md in the folder “Fractions”, in the file site.yaml and system.yaml, but redirect didn’t work. Now I understand, that my mistake was that I wrote redirect like this (I copied this example from documentation):