2

I'm working in a admin bundle but the css/js is not working. http://d.pr/i/UJHo

From the print, bootstrap js/css came from external domain, I tried to call a local bundle file but I got the error. My htaccess is unchanged from original laravel: http://d.pr/i/VWua

  • In my apache sites-avaible, my virtualhost is aparently correct http://d.pr/i/CBXO
  • My style.css already have the right permission and already exists:

    $tree public/bundles/admin public/bundles/admin └── css └── style.css

Tip: When I access http://domain/img/bg.png that's works, but not when I try http://domain/images/bg.png

Lucas Serafim
  • 3,702
  • 6
  • 30
  • 36

2 Answers2

1

It looks like you are rewriting /images to /public/img. 'public' is the webroot so presumably the request is going to /public/public/img...

But it looks like these rules aren't being applied at all because the /img path would have the same issue. Check the body of the 404 response. If it contains HTML for the 404 page returned by Laravel then this is the case.

Either way those lines are not really needed. If you want /images to return stuff in /public/img, then you should create a symlink from /public/images to /public/img.

Collin James
  • 9,062
  • 2
  • 28
  • 36
  • That's it, thank you :D To be clear for other guys I just changed my public/.htaccess http://d.pr/i/VWua to http://d.pr/i/soiW because we already are in /public Thank's again cojam – Lucas Serafim Mar 07 '13 at 18:47
1

I think you should improve your .htaccess file.

I suggest using this:

RewriteEngine On
RewriteRule !\.(js|gif|jpg|png|css|txt)$ public/index.php [L]
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ public/$1 [NC,L]

That works pretty fine for me.

Gilberto Albino
  • 2,572
  • 8
  • 38
  • 50