Creating First App with Hello Page

Good Afternoon,

I have been looking through the guide and thought i would give it a test but when i create a the Echo Say controller it get an error as it seems to put ‘en’ Infront of the URL, any help would be appreciated

404

The page /en/say not found.

The above error occurred while the Web server was processing your request.
Please contact us if you think this is a server error. Thank you.

Go Back Home

<?php

declare(strict_types=1);

use App\Controller\SiteController;
use Yiisoft\Router\Group;
use Yiisoft\Router\Route;
use App\Controller\EchoController;

return [
    Route::get('/say[/{message}]')->action([EchoController::class, 'say'])->name('echo/say'),
    Group::create('/{_language}')
        ->routes(
            Route::get('/')->action([SiteController::class, 'index'])->name('home'),
        ),
    
    ];

You define route as /say/*** but you call it as /***/say

Call it as /say/en not /en/say

I am not adding the en. It is being added somewhere else and is not visible in the address bar

Put full details. Hard to help with half presented info and few minutes in many of people here.

https://forum.yiiframework.com/t/how-to-ask-a-question-that-will-land-you-a-help/133752/3

The demo app behaves the same way. I think it have to be placed in DocumentRoot (if I remember correctly).

Sorry, What needs to be in the document root?

Or use yii serve. You should start it from the public folder which will become “document root”. (if I remember correctly)

(Next time I install a fresh demo I will check this out myself.)