I think if you do UsersController@getIndex instead it would work with a trailing slash.
Example:
Route::controller('/users', 'UsersController@getIndex');
Try changing this line in your .htaccess
file to this:
RewriteRule ^(.*)/$ $1 [L,R=301]
Note the missing slash before $1
.
If you don't want it to redirect at all, just remove that line entirely.
@Bubka3, that may work, but I would rather not have to create a route for each method of the controller if possible.
@JosephSilber, when I remove the slash before the $1 it gives me a 403 Forbidden.
What I did was remove the "L," to make it:
RewriteRule ^(.*)/$ $1 [R=301]
and it seems to be working the way I want now.
Thank you both for the help!!!
Pretty sure this is a configuration problem. Have you told laravel where the application's request root is? Also, if you're setting up an admin, you should be setting up an admin-test prefix for your routes as part of a group.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community