How to rewrite htaccess file for remove public path?
I now write project in Laravel 5.6 and I must remove public path from URL. I have .htaccess file in root directory Laravel with code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
But in my view files URL’s to assets not working correctly. For example this path not work correctly
<link href="" rel="stylesheet">
<link href="css/app.css" rel="stylesheet">
But if I add public path to assets path all working:
<link href="public/css/app.css" rel="stylesheet">
How can be work path to asstes without adding public path to assets URL?
from Laravel Questions and Answers https://laravelquestions.com/laravel/how-to-rewrite-htaccess-file-for-remove-public-path/
via Lzo Media
No comments:
Post a Comment