what do I have to do, to redirect the user to the index.php, when he is entering an old URL which isn’t existing anymore. I tried redirect 301 in the htacces file but it didn’t work.
Right now, if someone enters an old URL, Kirby loads the default template with header and footer and no content. But it should load the index.php. How can I get that?
I want, if someone enters website.com/oldprojects/title (URL from old wordpress installation) the user gets directed to the homepage. In the htaccess I tried to redirect every old URL to the new but it did not work like this:
The `Redirect` directive maps an old URL into a new one by asking the client to refetch the resource at the new location.
The old *URL-path* is a case-sensitive (%-decoded) path beginning with a slash. A relative path is not allowed.
I think your code (the old URL-path) is not correct.
In addition to that, you are mixing Redirect directives, which are loaded and executed by the mod_alias module, with the existing RewriteRule directives, which are coming from mod_rewrite. Mixing both of these is not recommended by Apache and if you do it anyway, their placement in the config is important:
when there are Redirect and RewriteRule directives in the same scope, the RewriteRule directives will run first, regardless of the order of appearance in the configuration file
Note that the ordering of directives alone is not the key, but you have to take into account the scope of your directives, which will be merged together by Apache after loading all config files, being it the main config, any other additional config or the .htaccess file (or even multiple .htaccess files if this is the case).
If you have access to your logfiles, you can try to increase the LogLevel to investigate whats happening.