Answers for "how to redirect wordpress site to another url"

PHP
1

wp_redirect to home page

function redirect_to_home() {
  if(!is_admin() && is_page('2')) {
    wp_redirect(home_url());
    exit();
  }
}
add_action('template_redirect', 'redirect_to_home');
Posted by: Guest on October-02-2020
0

inner pages redirecting to the https wordpress

My issue was resolved by checking the log file of the website and found the 
.htaccess permission was '640' and updated to the '755' and worked like charm!

Permission denied: [client IP:57563] AH00529: 
/var/www/html/WEB_FOLDER/public_html/wp-content/uploads/.htaccess 
pcfg_openfile: unable to check htaccess file, ensure it is readable and that 
'/var/www/html/WEB_FOLDER/public_html/wp-content/uploads/' is executable
Posted by: Guest on April-02-2021

Code answers related to "how to redirect wordpress site to another url"

Browse Popular Code Answers by Language