I have a website with only a wordpress(let’s call it blog) application in it. I now need to add another web app(let’s call it portfolio) to the same domain and will move the blog to site.com/blog. The user will be able to choose which one to visit on the splash page. So basically I will have the following structure:
site.com -> splash page
site.com/blog
site.com/portfolio
The thing is, I don’t want to break the existing links across the web to the blog posts and want to 301 redirect all requests that are not for /portfolio to the blog app, for example:
site.com/about_me redirects to site.com/wordpress/about_me but
site.com/portfolio/index doesn't get redirected.
I guess it’s done inside the .htaccess file but after much reading couldn’t get it to work.
Use a
RewriteCondto matchportfolioand act on non-matching requests: