Disable Laravel Routing for a specific folder/route

Mitchell M picture Mitchell M · Aug 6, 2013 · Viewed 17.3k times · Source

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 framework), but I'd like to retain my current forum software! The problem is, when laravel sees the "localhost/forums" it looks for a forums controller or route. I'd like it to simply go to the literal /forums directory..?

Answer

George D. picture George D. · Feb 2, 2014

I had to add this line in public/.htaccess

RewriteCond %{REQUEST_URI} !^/foldername

before this line (that redirects trailing slashes)

RewriteRule ^(.*)/$ /$1 [L,R=301]