I have a WordPress site www.myoldsite.com
The homepage of the site has nothing but 4 links.
English - links to my new site www.mynewsite.com
French - links to www.myoldsite.com/fr
German - links to www.myoldsite.com/de
Russian - links to www.myoldsite.com/ru
I want all old site pages to be redirected to the new site’s home page except the homepage and language versions of the site.
www.myoldsite.com should not be redirected
www.myoldsite.com/fr should not be redirected
www.myoldsite.com/de should not be redirected
www.myoldsite.com/de should not be redirected
but anything else after forward slash should be redirected to the new site’s home page. i.e.
www.myoldsite.com/page1
www.myoldsite.com/page2
etc. should all be redirected to www.mynewsite.com.
Can anyone please help?
Below is my htaccess file
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
You can use this site for generates redirects
http://www.rapidtables.com/web/tools/redirect-generator.htm
http://www.htaccessredirect.net/
or google it .htaccess Redirect Code Generator