1

I am trying to load css files from themes folder which is in the root directory. But 404 error is thrown in the console:

GET http://127.0.0.1:8000/theme/elite/css/mainie.css net::ERR_ABORTED 404 (Not Found)

The files are there and working fine on the shared hosting. After downloading the project to my localhost this happened. Must say that I cleared all the caches if that is somehow related with the issue.

php artisan cache:clear
php artisan route:clear
php artisan config:clear
php artisan view:clear

Checked other solution in stackoverf and github but couldn't make it.

1 Answer 1

1

When properly set up (or when using php artisan serve), the root directory is not accessible by browsers. This is important for security.

Only files in the public directory can be accessed in the browser, so move your themes folder into that and it should all work.

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

2 Comments

(Also, decide if it's themes or theme. You use them interchangeably in your question.)
It's a typo. Thank you :)

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.