I'm trying to something with my php 301 headers and i'm unable to get it to work. If someone can help then i'll much appreciate it.
I have duplicate content issues to the point where i have upto 5 urls pointing to the same product page. This is because of trying various url seo tools whilst during and after a google deep crawl. What an idiot!!! 😢
What i'm trying to do is the following and placing it into the head of my product_info.php document:
<?
header( "HTTP/1.1 301 Moved Permanently" );
header( "Status: 301 Moved Permanently" );
header( "Location: http://www.$product_info['products_one']" );
exit(0); // to avoid any accidental output
?>
The "$product_info['products_one']" is the new url that is stored in the database that is brought up when the page loads. The same way as it does when it brings up the product name, description etc.
Can anyone shed some light on this. Your help will be greatly appreciated.