For some reason (I've never had this issue before) all of the files that exist in either my img, js, or css folder "dont exist" ... I'm getting a 404 Not Found
-
which server? try checking document root settingAkhilesh Singh– Akhilesh Singh2013-09-13 23:36:23 +00:00Commented Sep 13, 2013 at 23:36
Add a comment
|
2 Answers
To include css/js/etc stored in public folder use URL::asset method, i.e.
<link href="{{ URL::asset('bootstrap/assets/css/bootstrap.css') }}" rel="stylesheet">
Update: You may also try
{{ asset('bootstrap/assets/css/bootstrap.css') }}
Here, bootstrap folder is inside domain_root/public folder.
14 Comments
Hao Luo
Or simply the helper function asset()
The Alpha
@HaoLuo, Yes, it's also fine.
dcolumbus
No, this isn't working ... it's something strange going on. Everything returns a 404 Not Found.
The Alpha
Can you check the source of your
css file and check the href ?dcolumbus
It's probably a server configuration error ... I'm going to mark this as the correct answer since your solutions should all work. Thanks anyways.
|
If @Sheikh Heera's answer is not the one you need, best to double-check your .htaccess file to ensure it allows existing files through the index.php rewrite filter:
RewriteCond %{REQUEST_FILENAME} !-f
1 Comment
dcolumbus
Well, the views load fine ... it's when i try loading any files within the public folder. (which is now httpdocs for my app)