0

I have Laravel app.

I am referencing a CSS file.

The file is inside a public folder, css app.

it is working fine locally when deploying to heroku, it says 404.

web: vendor/bin/heroku-php-apache2 public/

and my .htcsss

is

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_URI} !^public
    RewriteRule ^(.*)$ public/index.php?$1 [END,QSA]
</IfModule>

both in the root and under public folder.

I am loading my asset

  <link href="{{ secure_asset('/css/app/shopex.css') }}" rel="stylesheet">
    <link href="{{secure_asset('css/app/shopex.css')}}" rel="stylesheet">
    <link rel="stylesheet" href="{{secure_asset('css/app/shopex.css')}}" />
    <link rel="stylesheet" href="{{secure_asset('/css/app/shopex.css')}}" />
    <link rel="stylesheet" href="{{secure_asset('public/css/app/shopex.css')}}" />
    <link rel="stylesheet" href="{{secure_asset('/public/css/app/shopex.css')}}" />

    <link rel="stylesheet" href="public/css/app/shopex.css" />
    <link rel="stylesheet" href="/public/css/app/shopex.css" />

    <link rel="stylesheet" href="{{asset('css/app/shopex.css')}}" />
    <link rel="stylesheet" href="{{asset('/css/app/shopex.css')}}" />
    <link rel="stylesheet" href="{{asset('public/css/app/shopex.css')}}" />
    <link rel="stylesheet" href="{{asset('/public/css/app/shopex.css')}}" />

1 Answer 1

-1

Hi try to remove first backslash from 'css/app/shopex.css' and check the ssl sertificate still alive on your heroku becouse secure_asset use The secure_asset function generates a URL for an asset using HTTPS. Try to use asset becouse The asset function generates a URL for an asset using the current scheme of the request (HTTP or HTTPS):

Sign up to request clarification or add additional context in comments.

1 Comment

not working bro\

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.