Laravel 404 error, Laravel root directory can be accessed, non-root directory will appear 404 page could not find the error

Source: Internet
Author: User
Tags nginx server


Laravel root directory can access Route::get ('/', ' [email protected] ');

The non-root directory will be 404 pages can not find the error, as follows

Route::get (' user ', ' [email protected] ');

Workaround:
First before installing

1,php Open Phpopenssl

2, open rewrite in Apache conf
Modules (#LoadModule rewrite_module modules/mod_rewrite.so)

3, locate directory in the Conf file to change allowoverride None to allowoverride all

<directory "C:/apache24/htdocs" >
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
4, add the. htaccess file under the public directory of the Project project Laravel, the file contents are as follows

<ifmodule mod_rewrite.c>
Options-multiviews
Rewriteengine on

Rewritecond%{request_filename}!-d
Rewritecond%{request_filename}!-f
rewriterule ^ index.php [L]
</IfModule>

(currently Apache server resolved, Nginx server is not successfully resolved after the post-resolution update)

Laravel 404 error, Laravel root directory can be accessed, non-root directory will appear 404 page could not find the error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.