lundi 7 août 2017

laravel: how to display the assets that are inside the Public folder

On the server (shared-hosting) all the assets that are inside the public folder are not displayed. i.e.

<img src="" >

output this

<img src="http://ift.tt/2vHFtbP" >

it supposed to have a public folder

http://ift.tt/2wB1w0q

On my Public_html folder I have this folder structure

PUBLIC_HTML
├───app
├───bootstrap
├───cgi-bin
├───config
├───database
├───public
│   ├───css
│   ├───img
│   ├───js
│   ├───uploads
│   └───videos
│   .htaccess(file)
│   .index.php(file)
├───resources
├───storage
└───tests
└   .htaccess(file)

both of the .htaccess file is like this file

DirectoryIndex public/index.php
<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ public/index.php [L]
</IfModule>

permissions

enter image description here

So my questions is how can I set my configuration (.htaccess) so that I can display my assets on the shared-hosting site.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire