Redirecting documents with PHP, Apache, and MOD_REWRITE
In document PHP redirect with HTTP code assignment: header( "HTTP/1.1 301 Moved Permanently" ); header( "Location: http://www.domain.com/new-location/" ); The two lines above will redirect the document request to the /new-location/ page if nothing has been printed to the screen. If this method if attempted after printing something to the screen or flushing the output buffer [...]

