Макрос 301 redirect

15.06.2019
public function redirectCustom($id = 0)
{
	if(!$id) return '';
	$host = $_SERVER['HTTP_HOST'];
	$url = $this->get_page_url($id);
   
	header("HTTP/1.1 301 Moved Permanently");
	header("Location: http://".$host.'/'.$url);
	def_module::redirect($url);
	exit();
}
Rate this post

Comments 0

Добавить комментарий

Your email address will not be published. Required fields are marked *