Muhammad Shareyar
Muhammad Shareyar

Reputation: 822

Deployment of laravel project on heroku, assets are not working

I have deployed my laravel app to heroku, but my routes are not working and as i found out that I need to add index.php to my routes to access them and now they are accessing but my assets css js jquery is not working.It is my first deployment on heroku, your help is appreciated.

.htaccess

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

  RewriteEngine On AllowOverride All
  # 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>

Upvotes: 1

Views: 1488

Answers (1)

svikramjeet
svikramjeet

Reputation: 1945

While deploying to heroku you need not to add index.php to routes and other files (css/js etc ). Check if you have made any changes to htaccess file in public folder.

Upvotes: 1

Related Questions