-1
I have an Laravel 5.6 application hosted at Ycorn, there, because it is shared, I do not have SSH access, which makes it difficult to implement the framework.
With that, the helpers {{asset()}} and {{url()}} can’t find my CSS, JS, etc. This is causing me a lot of headache as the application doesn’t work 100%.
But, example the url() works for routes as well as route(), but to access files I have to do something like
href="url('public/images/'.$imagem)"
I’ve read that it might be .htacess, but I couldn’t.
In the hosting the site is in the folder public_html, so I moved my files from the folder /public/ from Laravel to the /public_html and adjusted to work.
Here is mine .htaccess:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
I’ve tried to put the RewriteBase /public /public_html but nothing worked