我在子文件夹中使用Lumen 到目前为止,我在route / web.php中有这样的内容
$router->get('/', [
'middleware' => 'Localization',
'as' => 'index',
'uses' => 'UfdController@index'
]);
$router->get('cms', [
'middleware' => 'Localization',
'as' => 'cms',
'uses' => 'CMSController@index'
]);
我什么时候做 mywebsite.com/subfolder ==一切正常,我可以看到我的udf控制器
我什么时候做 mywebsite.com/subfolder/cms我仍然看到ufd控制器而不是cms控制器。
在public / index.php中,我尝试了所有
$app->run(\Illuminate\Http\Request::capture());
$request = Request::capture();
$app->run($request);
$app->run();
$app->run($app->make('request'));
$request = Illuminate\Http\Request::capture();
$app->run($request);
$request = Request::createFromGlobals();
$app->run($request);
还有我的CMS控制器:
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class CMSController extends Controller
{
public function __construct()
{
}
public function index()
{
echo "CMS";
}
}
他们都没有工作。我还有其他配置需要做吗 阿帕奇? htaccess? 谢谢