Jump to content

Recommended Posts

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.

 

 

Link to comment
https://forums.phpfreaks.com/topic/62671-help-with-php-headers-header-location/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.