prograhammer
prograhammer

Reputation: 20590

Laravel 4: I have a route parameter named the same as a folder in my public folder, the route is not getting called

In Laravel 4,

I have a route defined like this:

Route::controller('abc','abc\SomeController');

And in my public folder I have this:

abc
packages
.htaccess
.project
favicon.ico
index.php
robots.txt

If I browse to the route, I get a directory view of the abc folder. If I rename the abc folder to xyz, then my route works. Any ideas?

Upvotes: 1

Views: 878

Answers (1)

Andreyco
Andreyco

Reputation: 22872

What you experience is normal behaviour of web server.
Web server finds actual abc folder in your public directory so URL is not redirected to index.php but abc/SomeController is requested directly (and SomeController is not found in public/abc)

That's normal behaviour. If server finds that abc folder exists, this URL is not redirected to index.php, but send directly to abc

Upvotes: 1

Related Questions