I have a small question, I would like to set up redirects for search engines. There are in principle 2 possibilities:
the retour plugin, but here I have had numerous problems, occasionally the database deletes itself etc. The problems are known
the cookbook recipe of @texnixe, here I am a bit bothered by the fact that I have to create the pages really what is sometimes associated with a lot of effort.
Therefore, I was wondering if it is not simply about a structure field. But I have some problems here. Especially if the website is on localhost in a subfolder. My demo instance is on localhost:8888/pb6, so my code doesn’t work here. I’m generally wondering if I have the right approach here, or what I’ve written together is total nonsense. Is there a “Kirby-Like” solution for this?
Ohh, sorry, that was from @distantnative, I’m almost used to it since most cookbook recipes come from you
I imagine it so that in the from field, for example, /oldpage is entered and in the to field /newpage. Just quite simple redirects for search engines like Google, if for example a page was newly created and the URLs have changed.
Sounds as if that needs a hardcode path which won’t work in different environments. While server side config is always better, it’s just not as flexible.
Plus you would have to generate this file in a hook whenever the structure field changes. Not a big deal, but still.
That’s how I see it too unfortunately, of course I could have the file generated via a hook, but the .htaccess variant doesn’t seem the best to me. Effectively I’m looking for something between the fixed templates and the powerful Retour plugin.
In principle, my code works, but I think it could be much better. The example of K2 I understand unfortunately not quite.