Reputation: 21
I have created folder(upload) in main cake directory(cakephp 3.0) and upload file in this folder. when i read and get content of this file then cake php throw error "Missing Controller".
my upload file url :- http://localhost/newoce/xyz/upload/CaptionSync__Sample.vtt Cake dir structure:- bin config upload logs src vendor webroot
my requirement is that upload all files in upload folder not in webroot folder and read files from upload folder.
Can any help me how we read file from upload folder.
Thanks Ramesh
Upvotes: 1
Views: 529
Reputation: 2860
create .htaccess file in upload directory and put following code in that
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /upload/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /upload/ [L]
</IfModule>
Upvotes: 1