skip to Main Content

I have a website in production that cannot access some folders in public/css. I checked permissions on all folders, checked my .htaccess in public folder, I cannot find the reason why some folders show up in my local version Local, but not in my production version Prod.

For example for this :

<link rel="stylesheet" href="{{ asset('css/directives/gallery.css') }}"/>

In my local version, it works because the folder directives shows up, but in production I get a 404 error.

Failed to load resource: the server responded with a status of 404 (Not Found)

This is how it looks on my production server Production Files, and inside directives

Website is written in PHP using Laravel 5.4, below is my .htaccess file in production, it is the same as in my local version.

Thanks

<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 ^ index.php [L]

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>

2

Answers


  1. Give all permissions to the public folder
    chmod -R 777 public

    Login or Signup to reply.
  2. Is the owner and the group of ‘directives’ directory the same as in other directories ?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search