Support the ongoing development of Laravel.io →
posted 9 years ago
Configuration

I am using Laravel 5.2 on bitnami LAMP. I also tried the same in the AMPPS. OS is Ubuntu 16.

All the GET routes are perfectly working. But whenever I hit a post route (even through ajax), I get the following error :

Not Found - 404 The requested URL was not found on this server.

By the way, I read other solutions online

I have enabled :

    LoadModule rewrite_module modules/mod_rewrite.so

In the apache httpd configs I have set:

    AllowOverride All

my .htaccess which is in the project/public folder is :

    <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 : This code perfectly works on windows XAMP server. I cant get this to work on Ubuntu.

Last updated 3 years ago.
0

Do you get the default apache 404 or a laravel 404 error page?

0

LaurentMeganck said:

Do you get the default apache 404 or a laravel 404 error page?

The apache 404

0

Sign in to participate in this thread!

Eventy

Your banner here too?

geethpw geethpw Joined 5 Jul 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.