我在 Ubuntu 19.10 中使用 Laravel。问题是当我尝试访问 project_name/login 时,它说在服务器上找不到请求 url。我试图更改 apache2.conf 并更改我 laravel 项目的公共文件夹中的 .htaccess 。但它不起作用..
这是 /etc/apache2/ 中的 apache2.conf
这是我项目公共文件夹中的 .htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
我已经用这样的命令启用了 a2enmod 重写
sudo a2enmod rewrite
慕姐8265434
慕婉清6462132
至尊宝的传说
随时随地看视频慕课网APP