Маршруты Laravel не работают.
Вот мой файл .htaccess, это конфигурация Laravel по умолчанию. Он находится в публичном / .htaccess.
<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>
Также, вот файл httpd.conf
<Directory />
AllowOverride All
Options -MultiViews -Indexes -FollowSymLinks -IncludesNoExec -Includes -ExecCGI
Require all granted
</Directory>
<Directory "%ssitedir%/public/*">
AllowOverride All
Options -MultiViews +Indexes +FollowSymLinks +IncludesNoExec +Includes +ExecCGI
#Options -FollowSymLinks +SymLinksIfOwnerMatch # Защита лучше, но нагрузка выше
Require all granted
</Directory>
<Directory "%ssitedir%/*">
AllowOverride All
Options -MultiViews +Indexes +FollowSymLinks +IncludesNoExec +Includes +ExecCGI
#Options -FollowSymLinks +SymLinksIfOwnerMatch # Защита лучше, но нагрузка выше
Require all granted
</Directory>
<Directory "%sprogdir%/modules/system/html/openserver">
AllowOverride All
Options -MultiViews -Indexes -FollowSymLinks -IncludesNoExec -Includes -ExecCGI
AddDefaultCharset Off
Require all granted
Require ip 127.0.0.0/8 ::1/128
Require ip %ips%
%allow%Require all granted
</Directory>
<Directory "%sprogdir%/modules/system/html/default">
AllowOverride All
Options -MultiViews -Indexes -FollowSymLinks -IncludesNoExec -Includes -ExecCGI
AddDefaultCharset Off
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
Require all granted
</Directory>
Я использую
OpenServer V5.2.2
Apache V2.4
mod_rewrite включен.
Я думаю, у меня есть некоторые проблемы с каталогами в конфигурации, но я не знаю, где.
Кто-нибудь знает, как это исправить?