After using composer to download laravel, configure apache. The mod_rewrite module is enabled, and AllowOverrideNone is changed to All. After opening localhost in a browser, the welcome page is not displayed, but the list of three files in public. However, what is written in this tutorial is :...
After using composer to download laravel, configure apache. The mod_rewrite module is enabled, and AllowOverride None is changed to All. After opening localhost in a browser, the welcome page is not displayed, but the list of three files in public.
However, in the tutorial, "Laravel framework does not need index. php In the URL through the public/. htaccess File ".
Solution:
Options + FollowSymLinks
RewriteEngine On
RewriteCond % {REQUEST_FILENAME }! -D
RewriteCond % {REQUEST_FILENAME }! -F
RewriteRule ^ index. php [L]
Adding/overwriting the. htaccess file under the original public is not feasible.
Other information: apache2.4.12/php 5.4.42/laravel5/winxp X86
How can this problem be solved?
Thank you!
Reply content:
After using composer to download laravel, configure apache. The mod_rewrite module is enabled, and AllowOverride None is changed to All. After opening localhost in a browser, the welcome page is not displayed, but the list of three files in public.
However, in the tutorial, "Laravel framework does not need index. php In the URL through the public/. htaccess File ".
Solution:
Options + FollowSymLinks
RewriteEngine On
RewriteCond % {REQUEST_FILENAME }! -D
RewriteCond % {REQUEST_FILENAME }! -F
RewriteRule ^ index. php [L]
Adding/overwriting the. htaccess file under the original public is not feasible.
Other information: apache2.4.12/php 5.4.42/laravel5/winxp X86
How can this problem be solved?
Thank you!
Have you restarted APACHE after configuration change?
Baidu sent a piece of related information saying that the rewrite module of apache was not correctly loaded.
You can perform a test without lavarel,
Write a simple rule to test whether rewrite works normally, and then check other configuration problems.
RewriteRule ^ index. php [L]
This sentence means that any prefix will jump directly to index. php. It should be correct.