I have a website with Laravel, I am starting a wordpress blog on the website with url.
I have uploaded wordpress blog in the public directory of laravel. To exclude wordpress blog from laravel htaccess rules, I have added following line in my laravel htaccess
RewriteCond $1 !^(blog)
It works fine, but when I enabled SEO friendly urls for the blog to make urls as
http://abcd.com/blog/sample-post/
it gives internal error when I try to view a blog post.
So long as you have the following two files, you should be just fine:
DOCUMENT_ROOT/.htaccess
(where the document root is your Laravelpublic
directory):DOCUMENT_ROOT/blog/.htaccess
:Of course, I’ve trimmed down the defaults – just showing what should be in each file.
So, you don’t actually need to exclude the directory at all. That’s already done with
RewriteCond %{REQUEST_FILENAME} !-d
.