I thought 301 redirecting some dynamic pages would be as simple as putting the following code at the top of my dynamic page:
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.firstclasscomponents.com" );
However it seems this is not the case since it produces a 302 instead.
Basically the dynamic page has a url that looks like this http://www.mysite.com/AD9505Z2.html
and the AD9505Z2 is part of a what gets queried in the database so that the records information is used in the page.
I use a .htaccess file to do the rewrite. So that looks like this:
RewriteRule (.*)\.html /part_info.php?url=$1
Well the page works fine, but I actually wanted to wipe out all the pages from google and do a 301 to the home page of the site. However everything I have tried has just produced 302's. Does anyone have any thoughts. I have tried all kinds of different things and nothing is working.