Support the ongoing development of Laravel.io →
Configuration Architecture

Hello, a very frustating Error stops me from start coding with laravel. I will explain it short and simple with an example:

The following code works just fine:

// app/routes.php
Route::get('/', array(
    "as" => "home",
    "uses" => "HomeController@Home"
));

It proceeds with the controller function named Home and everything looks pretty. But if i change the route parameter like this for example:

// app/routes.php
Route::get('/home', array(
    "as" => "home",
    "uses" => "HomeController@Home"
));

And open that adress I get the following error displayed at my browser:
Not Found

The requested URL /home was not found on this server. Apache/2.4.7 (Ubuntu) Server at 192.168.241.128 Port 80

I can't manage to get this fixed. Is there some config item i need to set or what causes this? :(

Last updated 3 years ago.
0

Is mod_rewrite enabled on your Apache server? If not, enable it and restart Apache.

Last updated 3 years ago.
0

Thank you! You helped me alot!
The mod was enabled but i still had to allow it for certain Directories in one of the configs!
For future reference: I've added the following entry to the apache.conf file:

<Directory /var/www/project_x/laravel/public>
	Options Indexes FollowSymLinks
	AllowOverride All
	Require all granted
</Directory>

The Directory is the one i declared as my root directory in the default.conf (with "DocumentRoot /var/www/tcrafter/laravel/public")

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

meneman meneman Joined 7 May 2014

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.