mercredi 23 mars 2016

CKfinder and Laravel, Error listing directories and files

I'm using CKFinder for my Laravel 5.1 Project and problem occurs when put this project in production.

When developing at localhost (with homestead),

  • I point www.site.com -> /home/vagrant/Code/site.com/public folder
  • CKFinder config.php set backend 'baseURL' = '/uploads'

It work find but when put in production to cPanel host. I must use .htaccess file to point my domain to public folder

RewriteEngine on
RewriteCond %{HTTP_HOST} site.com
RewriteCond %{REQUEST_URI} !^/public
RewriteRule ^(.*)$ public/$1 [L]

Now when I open CKFinder, It cannot list directories and files. So I set 'baseUrl' = dirname(__DIR__) . '/public' in CKFinder config.php. It can list directories and files now. But If we select a file, It return /home/vagrant/Code/http://ift.tt/1RfOZ9f

Does anybody have familiar with this ?

Thank you very much



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire