laravel remove /public/ from url and when calling css and javascript -


most of know how remove /public/ url by:

  1. rename server.php in laravel root folder index.php
  2. copy .htaccess file /public directory laravel root folder

but still have add /public/ each time tried call css or js file

/public/js/file.js
/public/css/file.css

do have access apache or nginx configuration? simplified virtual server definition in httpd_vhosts.conf apache looks that...:

<virtualhost *:80>     servername localtest.com     documentroot "/library/webserver/documents/localtest/public" </virtualhost> 

this how redirect root localtest.com public directory. in case localtest directory contains laravel app... not directly accessible through localtest.com.

hope helps.


Comments