Custom Routing

I have seen a few posts that custom routing isn’t really a thing yet, but I’m in a situation that needs it.

I am currently helping migrate between two different CMS’s and I am playing with to send the initial request to Grav and then sending it to the other CMS if the page still exists in the CMS we are moving away from so we can keep our SEO intact while we migrate this over. When this is directed to grav’s index.php, it fails to initialize the system. but if I go to system loads fine. Is there any documentation to why this is? Do you guys have any advice on how best to do this? Other than holding off on the other CMS and replacing it once it is done.

Grav actually does have quite powerful custom routing. At the site level via site.yaml and also at the page level. This is all covered in the documentation.

However, it appears your problem is that Grav is located in a grav/ folder and not at the root of your subdomain. You should copy/move everything including the .htaccess file into the root.

Ahhh. The tricky part is that we need both to run at root and direct the request based on the url. We are moving it over piece by piece and trying to avoid putting grav on a subdomain and the system we are moving from couldn’t be less different. :frowning:

Then you just need to setup a rewrite rule in your webserver config to process both variants.