laravel The requested URL was not found on this server

今天调试项目的时候,发现除了首页,所有页面都打不开!!!
在这里插入图片描述
一开始以为apache配置问题,检查重启后无反应,路由层debug也没有反应,才发现同事提交代码时把public目录下的.htaccess置空了,重新填写,再次调试恢复正常!

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

    RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

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

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

 

posted @ 2022-04-25 10:34  佛系时常  阅读(247)  评论(0编辑  收藏  举报