Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Introducing MVC Frameworks in PHP Model View Controller Slim MVP

Darrell Conklin
Darrell Conklin
21,862 Points

Internal Server Error

"The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, you@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log."

This is the message I get after adding the .htaccess file and pasting in the rules from the notes associated with the video.

Apache error log:

[Thu Jan 03 19:54:48 2019] [alert] [client ::1] /Users/Eliyah/Documents/slimmin/.htaccess: RewriteRule: bad flag delimiters

Rules added to .htaccess :

RewriteEngine on
RewriteBase /

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

1 Answer

Darrell Conklin
Darrell Conklin
21,862 Points

Ok ... so the space between the comma and the L was causing the error.

changed:

RewriteRule ^ index.php [QSA, L]

to:

RewriteRule ^ index.php [QSA,L]

and it works just fine.

Darrell Conklin
Darrell Conklin
21,862 Points

They were pasted directly from the notes. Might want to update them.

Darrell Conklin
Darrell Conklin
21,862 Points

It's even got a space in the quiz after the video.