Reputation: 2868
I have an Laravel 5.2 application where I have a 404 route to catch all wrong urls and display an error. Now I simply want images in a specific directory to be open for all (non authenticated) users.
To make things a little bit more clear:
These are my routes at the moment.. Everything not defined under the 404 redirects to the 404 page.
Route::auth();
// This is the 404 catch
Route::get('404', function(){
return view('errors.404');
});
Route::resource('/', 'HomeController');
Route::resource('/work', 'WorkController');
Route::resource('/about', 'AboutController');
...
Any help would be appreciated!
EDIT: the directory 'signature' has multiple images in them (at the moment 50) and the amount in increasing every day. So defining every single one will not be an option!
EDIT: this is the htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
Upvotes: 2
Views: 1265
Reputation: 9191
Try adding the following to your .htaccess, right before the RewriteRule line
RewriteCond %{REQUEST_URI} !^/signature
Upvotes: 2