Laravel 5.2 LAMP堆栈POST路由错误404

时间:2016-07-05 06:26:56

标签: php apache laravel-5.2 lamp ampps

我在bitnami LAMP上使用Laravel 5.2。我也在AMPPS中试过了同样的东西。操作系统是Ubuntu 16。

所有GET路线都完美无缺。但每当我点击后路线(即使是通过ajax),我都会收到以下错误:

  

Not Found - 404在此服务器上找不到请求的URL。

顺便说一句,我在线阅读其他解决方案

我启用了:

LoadModule rewrite_module modules/mod_rewrite.so

在我设置的apache httpd配置中:

AllowOverride All

项目/公共文件夹中的.htaccess是:

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>

RewriteEngine On

# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>

PS:此代码完全适用于Windows XAMP服务器。我不能让它在Ubuntu上工作。

0 个答案:

没有答案