The wordpress site I'm working got moved into a subdirectory therefore all the links from other sites don't work anymore. I implemented a 301 redirect with htaccess which is great because it fixes that problem BUT the old root directory now has an index.html that has landing page my client absolutely wants to be seen.
So, how can I set up my htaccess to redirect all traffic into the sub directory (to fix the incoming links) EXCEPT the index.html in the root directory because it has the landing page.
I don't know how htaccess works well but this is what I have right now.
Code:
Order deny,allow
ErrorDocument 404 /404.php
DirectoryIndex index.php index.html
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/$ [OR]
RewriteRule ^.*$ http://example.com/portal/$0 [R=301,L]
So to recap:
Right now EVERYTHING redirects from the root to the subdirectory. I want everything to redirect EXCEPT for index.html in the root directory because it's a landing page.
Thanks!!