Forum Moderators: coopster

Message Too Old, No Replies

How to redirect this?

         

andrewshim

3:45 pm on Jun 2, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A year ago, oblivious to the duplicate content penalty, I added a variable to my most busy page changing it from :


idea.php?variable1=example1

to

idea.php?variable1=example1&variable2=example2

Now, obviously these two URLs point to the same page. It's just that the extra variable was added to enable some internal processing.

Am I correct to assume that I can make a 301 redirect using PHP from


idea.php?variable1=example1

to

idea.php?variable1=example1&variable2=example2

?
There are approximately 500 URLs involved.

Habtom

5:08 am on Jun 3, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<?php
// Permanent (301) redirection
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.example.com/idea.php?variable1=example1&variable2=example2");
exit();
?>