‘php’ Tagged Posts

Wordpress Url Parameters

How to do a 301 htaccess rewrite rule? How to do a 301 htaccess rewrite? I have several diferent parameters appended to my URL - I need all of these ...

 

How to do a 301 htaccess rewrite rule?

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=whatever&utm_medium=something&utm_campaign=myemail@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=THIS&utm_medium=THAT&utm_campaign=OTHERTHING24@yahoo.com

I need to rewrite ALL urls that contain ?utm_source=somthin…
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

PLEASE ANSWER within the htaccess text displayed above

You’re pretty ungrateful, considering your previous question didn’t mention your needs.

To redirect all querystrings that contain the querystring variable utm_source to the free-guide subdirectory:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule index.php [R=301]
RewriteCond ?utm_source [NC]
RewriteRule free-guide/ [R=301]

Good luck with your keyword spamming.

Pendulum – Parameter