Receiving 500 Internal Server Error when using nice URLs (?)

Posted 3 years ago by andreasb

Good morning everyone,

I am following Jeff's videos to learn Laravel and I love it!

Obviously, while playing around a bit with the concept of routes etc I run into my first error:

Internal Server Error

Now, what do it do? My routes.php looks like this:

Route::get('/', 'StaticPagesController@welcome');

Route::get('about', 'StaticPagesController@about');

When I go to everything works. If i go to I get the 500 error.

Now both my storage and bootstrap/chache directories have the proper permissions (750 to let the webserver use it). Just to make sure, I changed both to 777 but that didnt work either.

My Apache error log is - unfortunately - empty.

If I change the route to

Route::get('about', function(){return "hello";});

I still get the same 500 error.

Now then I thought it must be the .htaccess, which currently looks like this:

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

    AuthType Basic
    AuthName "Nothing to see"
    AuthUserFile /<path>/public/.htpasswd
    Require valid-user
    RewriteEngine On

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/$ /$1 [L,R=301]

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

If I remove the authentification part or use the alternative provided by the Installation Documentation:

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

(I omitted the auth part for testing) still doesn't work.

Since I am running out of ideas I kindly ask for your help :-)

Thanks Andreas

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.