Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

hfalucas's avatar

Help with multiple websites on Forge

I currently have a site on forge that allows for wildcards subdomains, kinda like slack style where:

  • slack.com -> shows the website
  • <team-name>.slack.com -> is each team chat.

This is how my current routes look like:

// routes...
$router->group(['domain' => '{team}.example.com'], function ($router) {
    // SPA Application routes...
    $router->get('/{any}', 'AppController@index')->where('any', '.*');
});

$router->get('/', 'PagesController@home');
$router->get('/product', 'PagesController@product');
// (...)

This is how my forge sites look like: Single site

What I am now trying to achieve, is having two sites on forge (different git repositories too ofc) where one is the website and the other one the application itself.

How I supose this can be done:

// Website routes file:
$router->get('/', 'PagesController@home');
$router->get('/product', 'PagesController@product');
(...)
// Application routes file
$router->group(['domain' => '{team}.example.com'], function ($router) {
    // SPA Application routes...
    $router->get('/{any}', 'AppController@index')->where('any', '.*');
});

Multiple sites

Is this possible? I haven't tried doing this yet because the app is already in production and wanted to have some opinion or guidance and not screw this up.

0 likes
2 replies
Shoneted's avatar

I'd figure this implies Gitlab isn't introducing effectively - as you say, the task registry vanishing would bring about these mistakes. What you have to do is make sense of why Gitlab Git isn't conveying as you think. Either the catalog structure in your venture isn't what you expect or Forge + Gitlab has issues imparting. https://www.paperdoer.co.uk/

Please or to participate in this conversation.