I've just re-developed one of my websites. The structure has changed therefore I need to globally redirect the old non existent pages that are still currently ranked on Google (50 or so pages) to redirect to my new website's HOME PAGE.
The structure has basically changed from pages - example:
www.website.com/page1.php
www.website.com/page2.htm
www.website.com/page3.php
... and so forth
to
www.website.com/page1/
www.website.com/page2/
www.website.com/page3/
... and so forth
After a bit of Googling, I came across this solution on SO
When I add:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . / [L,R=301]
to my .htaccess
file, the redirect (to the home page) for non-existing pages works - Great!
BUT now every link in my navigation / side panel on my new website (that exists) is also being redirected to the home page. So I cannot navigate through my website!
So for example when I click the about us link www.website.com/about-us/
or any other of my other 50 pages (regardless what they're named), the 301 redirect solution above keeps re-directing me to home page (as is if those pages didn't exist).
I want to globally redirect the old non existent pages that are still currently ranked on Google (50 or so pages) to redirect to my new website's HOME PAGE ... NOT my website's existing links.
Why is this? I thought the 404 redirect using 301 method would only target pages that DON'T exist.
Am I doing anything wrong?