Paolo Resteghini
Paolo Resteghini

Reputation: 432

How to stop Laravel directory errors

Is there a way in laravel to make directory accesable without Laravel having to get involved?

I recently ported a Wordpress website for my brother into Laravel (which I am new to) and all of the image paths are hard coded in the body of the blog article.

The issue I am having is that the url it need to read the image at is:

http://www.theunlikelytraveller.co.uk/wp-content/uploads/2015/11/DSC_0728.jpg

but laravel doesn't like that.

Here's the article: http://www.theunlikelytraveller.co.uk/posts/a-return-to-the-beautiful-balkans

Can anyone help?

Upvotes: 1

Views: 34

Answers (1)

Alexey Mezenin
Alexey Mezenin

Reputation: 163948

If you want to force Laravel to ignore wp-content directory, for example, you can edit .htaccess file inside a public directory:

RewriteRule ^wp-content - [L,NC]

This line should be added before other rules.

Upvotes: 1

Related Questions