Laravel, which I just bought, recorded the pitfalls encountered this time. I didn’t write many articles, but it is a good habit for programmers to write blog posts. I insist on and work hard on this.
Make sure the following configuration items are correctly configured:
LoadModule rewrite_module modules/mod_rewrite.so (remove the previous # comments)
AllowOverride All (In the configuration of the root directory, make sure to set it to All)
Needless to say, the framework installation is done, everyone will solve it themselves.
I don’t know about other versions. The blogger is version 5.0, so I directly find the public directory in the root directory. There is a .htaccess file below. However, if this framework is installed under Windows, and the above two items are opened, there is no problem. You can do it without it.
However, Linux needs to add a sentence ("RewriteBase / "):
<IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews </IfModule> RewriteEngine On ################################ RewriteBase / ################################ # Redirect Trailing Slashes... RewriteRule ^(.*)/$ /$1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ [L] </IfModule>
Then visit, OK!
The above article about laravel 5.0 solving the problem of .htaccess invalidity and removal under Linux is all the content I share with you. I hope you can give you a reference and I hope you support me more.