mvnobrega's avatar

laravel with wordpress redirect 301 [ SOLVED ]

I have a website made in laravel and inside the "blog" folder inside "public", I have wordpress installed.

I used the following code in my ".htaccess" to handle the "blog" folder independently:

RewriteCond $1 !^(blog)

And this is working very well. But I installed a plugin in wordpress to do 301 redirects of old pages and these redirects don't work, because the url after "/blog/" is seen as laravel url, and therefore the redirect doesn't work as expected.

How do I make this code "RewriteCond $1 !^(blog)" take into account everything that comes after it ? so that it doesn't fall into laravel routes but wordpress?

0 likes
2 replies
sr57's avatar
sr57
Best Answer
Level 39

St like this ?

RewriteCond $1 !^/blog/.*$

2 likes

Please or to participate in this conversation.