I am stuck. I'm not sure much about htaccess and I am just winging it. Can someone consider the code and let me know wrong by using it. I only desire to redirect a classic site to a different site and also the only changes would be the domain, a flexible which will match between old/new pages as well as an added word towards the permalink structure.

Here's a few of the versions I have attempted to date:

Options +FolowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^.*domain.com/matchingword1-(.*)-matchingword2-matchingword3/ [NC]
RewriteRule ^(.*)$ http://www.newdomain.com/matchingword1-$1-matchingword2-differentword-matchingword3/ [R=301,L]

Options +FolowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^.*domain.com/matchingword1-(.*)-matchingword2-matchingword3/ [NC]
RewriteRule ^(.*)$ http://www.newdomain.com/matchingword1-%1-matchingword2-differentword-matchingword3/ [R=301,L]

RewriteCond %{QUERY_STRING}  ^$
RewriteRule ^domain\.com/matchingword1-(.*)-matchingword2-matchingword3/$ http://www.newdomain.com/matchingword1-\$1-matchingword2-differentword-matchingword3/\ [R=301? [R=301,NE,NC]

The section (. *) would be the identical as $1 around the new domain however the permalink is a touch different. Negligence the permalink that's (. *) is going to be everything from multiple words and amounts.

For instance: matchingword1-this-page-is-first-matchingword2-matchingword3/ redirects to newdomain us dot com/matchingword1-this-page-is-first-matchingword2-differentword-matchingword3/

The rewrite condition for HTTP_HOST is exactly what is passed within the request's "Host:" header, which only consists of the host (and perhaps a port). The Request URI is not a part of HTTP_HOST. Try something similar to this:

RewriteCond %{HTTP_HOST} ^.*domain.com [NC]
RewriteRule ^matchingword1-(.*)-matchingword2-matchingword3/ http://www.newdomain.com/matchingword1-$1-matchingword2-differentword-matchingword3/ [R=301,L]

The final set does not seem like it'll work on all.

Edit: comments will not allow me to place code

If you wish to redirect EVERYTHING, you need to use mod_alias' RedirectMatch:

RedirectMatch ^(.*)$ http://www.newdomain.com/$1

If you're serving your directory on a single demonstration of apache (as with, domain.com and newdomain.com is really exactly the same server serving in the same directory), you will want to rewrite. Something similar to this:

RewriteCond %{HTTP_HOST} ^.*domain.com [NC]
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]