I recently redesigned a site that now uses some different link names. The domain name is still the same it’s just that some pages are not found anymore that show up in search engine results pages. For instance http://www.domainname.com/contact-us is now http://www.domainname.com/contact. Now there are too many pages on the old site to redirect each one so I just want to send any of the page not found links to the home page of the new site.
The current htaccess code I have is for removing index.php from my urls.
I tried a bunch of different things but nothing worked and I can’t find anything documented on this. It’s all just moving olddomain.com to newdomain.com.
<IfModule mod_rewrite.c>
RewriteEngine On
# Removes index.php
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
# If 404s, "No Input File" or every URL returns the same thing
# make it /index.php?/$1 above (add the question mark)
</IfModule>