Disable Laravel Routing for a specific folder/route

前端 未结 6 1256
陌清茗
陌清茗 2021-01-17 08:49

I\'m wondering how to disable the routing on laravel for a specific directory?

I am hoping to run my main website off of laravel (I\'m rewriting it into the framewor

6条回答
  •  春和景丽
    2021-01-17 09:24

    You need to make an exclusion in your .htaccess file. Just above the rule that sends everything to index.php, add this:

    RewriteCond %{REQUEST_URI} !^/forums
    

    Anything that begins with /forums will not be sent to Laravel.

    (Of course, this is assuming you are using Apache.)

提交回复
热议问题