ibasket Posted July 31, 2007 Share Posted July 31, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/62671-help-with-php-headers-header-location/ Share on other sites More sharing options...
soycharliente Posted July 31, 2007 Share Posted July 31, 2007 Try: <?php 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 ?> Quote Link to comment https://forums.phpfreaks.com/topic/62671-help-with-php-headers-header-location/#findComment-311923 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.