I'm trying to do an .htaccess redirect from /modules.php?name=Farmtoschool to a new URL.
I've looked at the other posts here but it doesn't seem to work. (full htaccess below, redirect at the bottom)
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/modules.php$
RewriteCond %{QUERY_STRING} ^name=Farmtoschool$
RewriteRule ^(.*)$ http://mynewdomain.com/modules.php?name=Farmtoschool [R=301,L]
this is the link that I want to redirect:
http://myolddomain.com/modules.php?name=Farmtoschool
Any ideas? Thanks