I want to set the /upload page as the home page.

1200

Network license
License owner
Set the upload page/upload as the direct homepage, which file should be modified?
 

Rodolfo

The Chevere Guru
Chevereto Staff
That's on app/routes/route.index.php

At the very top to the handler callback there's a conditional in which another route gets included. You could add another conditional for the upload route.

After this:
PHP:
parse_str($_SERVER['QUERY_STRING'], $querystr);
Add this:
PHP:
        if (!in_array(key($querystr), ['random'])) {
            $handler->mapRoute('upload');
            include G_APP_PATH_ROUTES . 'route.upload.php';

            return $route($handler);
        }
Check the demo, I just routed it to /upload https://demo.chevereto.com/
 

1200

Network license
License owner
That's on app/routes/route.index.php

At the very top to the handler callback there's a conditional in which another route gets included. You could add another conditional for the upload route.

After this:
PHP:
parse_str($_SERVER['QUERY_STRING'], $querystr);
Add this:
PHP:
        if (!in_array(key($querystr), ['random'])) {
            $handler->mapRoute('upload');
            include G_APP_PATH_ROUTES . 'route.upload.php';

            return $route($handler);
        }
Check the demo, I just routed it to /upload https://demo.chevereto.com/
Thanks Rodolfo, I think this is great!
 
Top