‘howto’ Tagged Posts

Wordpress Url Rewrite .htaccess

How to do a 301 htaccess rewrite? I have several diferent parameters appended to my URL - I need all of these to 301 redirect to one page. Some exampl...

 

How to do a 301 htaccess rewrite?

I have several diferent parameters appended to my URL – I need all of these to 301 redirect to one page. Some example URLS are:

http://mydomain.com/free-guide/?utm_source=Aff&utm_medium=somthing&utm_campaign=email@yahoo.com

(you may need to mouseover these links to see the full link- yahoo answers is cutting them short)

OR

http://mydomain.com/free-guide/?utm_source=whatever&utm_medium=somthingelse&utm_campaign=someemail@yahoo.com

I need to rewrite ALL urls that contain ?utm_source=
to

http://mydomain.com/free-guide/

please help- Asked this a few days ago- but the answer was wrong- My htaccess file looks like this -


# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

RewriteRule . /index.php [R=301,L]