我是第一次使用 Lumen。我將流明文件放在文件夾 Test 中,并將文件夾保存在服務器的 /var/www/html 路徑中。我的 PHP 版本是7.4.3我有以下路線:$router->get('/key', function() {return str_random(32);});$router->get('/', function () use ($router) {return $router->app->version();});下面是我的htaccess:<IfModule mod_rewrite.c><IfModule mod_negotiation.c> Options -MultiViews -Indexes</IfModule>RewriteEngine On# Handle Authorization HeaderRewriteCond %{HTTP:Authorization} .RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]# Redirect Trailing Slashes If Not A Folder...RewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_URI} (.+)/$RewriteRule ^ %1 [L,R=301]# Handle Front Controller...RewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^ index.php [L]</IfModule>但是每當我嘗試訪問http://xx.xxx.xxx.xxx/Test/public/key時,它都會顯示在此服務器上找不到請求的 URL。但是如果我嘗試訪問http://xx.xxx.xxx.xxx/Test/public/它會返回給我Lumen (5.7.8) (Laravel Components 5.7.*)我怎樣才能使所有其他路線也可以工作?
- 2 回答
- 0 關注
- 176 瀏覽
添加回答
舉報
0/150
提交
取消