cytech / BillingTrack

BillingTrack quote, invoice, workorder management
48 stars 39 forks source link

[SOLVED] Css js files not loading #37

Closed ugintl closed 3 years ago

ugintl commented 3 years ago

It is working locally, but when I upload the files on a shared hosting, the css and js files are not loading. I see it like this

billingtrack

ugintl commented 3 years ago

I solved it. I created a .htaccess file in the root of the laravel app. I just had to add RewriteRule ^(.*)$ public/$1 [L]. See below

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>

    RewriteEngine On
    RewriteBase /
    RewriteRule ^(.*)$ public/$1 [L]
    # 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>