I have a laravel installation at same domain.com. The site is up and running. I need to install a wordpress in blog folder at domain.com/blog. when I try to install the word
I got a solution from laravel forum. Adding the line in the htaccess worked for me.
RewriteCond $1 !^(blog)
Blog is working properly as a separate folder.
Add below lines in .htaccess
RewriteCond $1 !^(bmcblog)
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
It will look like this
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteCond $1 !^(bmcblog)
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
this line in .htaccess is probably your culprit:
RewriteRule .*/$ /$1 [L,R=301]
comment it out and see it that solves your problem.
This line forces everything in the public domain to go through laravel's router. You could probably leave it by writing another regex above that line looking specifically for the /blog directory, or rewrite that line to route anything that != your blog directory.
You should really leave that line there if possible.