1

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

1
  • which server? try checking document root setting Commented Sep 13, 2013 at 23:36

2 Answers 2

1

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.

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

14 Comments

Or simply the helper function asset()
@HaoLuo, Yes, it's also fine.
No, this isn't working ... it's something strange going on. Everything returns a 404 Not Found.
Can you check the source of your css file and check the href ?
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.
|
0

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

Well, the views load fine ... it's when i try loading any files within the public folder. (which is now httpdocs for my app)

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.