Hi,

I would like to ask you about how I can write a php code for 301 Redirection and how I use it in my hosting ( where to code, where to upload and how to configure it) . Thanks.

well you can use the header(); as so below

header('Location: http://www.example.com/error.php?error=301');

and you can use htaccess to set up Error pages such as 301 and ect.
this is always a good thing to have also and there are some htaccess generates on google search that can help you to do this there is much you can do to refine your errors with in your site using htaccess and php hope this helps you with what your trying to do

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.