Answers for "wordpress 301 redirect htaccess"

PHP
5

redirect 301 wordpress

add_action( 'template_redirect', 'redirect_to_other_page' );
function redirect_to_other_page() {
    if ( is_page( 143 ) ) {
	  
      wp_redirect( '"'.home_url().'/services/messenger/"', 301 );
      ///wp_redirect( 'example.com/page', 301 ); 
    exit;
    }
}
Posted by: Guest on April-12-2021
0

redirect 301 htaccess

redirect 301 /url_antigua.html http://www.dominio-nuevo.com/url-nueva/
Posted by: Guest on December-01-2020

Browse Popular Code Answers by Language