我在尝试访问搜索路径时遇到错误405。POST方法。我发送了10个请求,其中9个正确处理,1个有错误,或者这个数字是相对的。
我不知道它是laravel、apache还是PHP版本配置?你能指导我吗,我可以展示你要求的文件。这只发生在我的生产服务器上。
.htaccess文件
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
Options -MultiViews -Indexes
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# 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_URI} !(\.svg|\.ico|\.json|\.css|\.js|\.png|\.jpg|\.gif|\.woff)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(css|js|img|fonts|audios|imagenes|svg|storage)/(.*)$ public/$1/$2 [L,NC]
</IfModule>
# php -- BEGIN cPanel-generated handler, do not edit
# Set the âea-php72â package as the default âPHPâ programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit