탐색 건너뛰기

Open

Reported for: WPML SEO 2.1.0

Topic Tags: Compatibility

Overview of the issue

If you are using Rank Math SEO plugin and its Remove base option in conjunction with WPML’s Different domains per language setting, it may lead to excessive redirections, resulting in the ERR_TOO_MANY_REDIRECTS error.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open …/wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-product-redirection.php file.
  • Look for line 139.
  • Replace:
    $link = trim( str_replace( Helper::get_home_url(), '', get_permalink() ), '/' );
    
  • With:
    // WPML -  Workaround for compsupp-7311
    $home_url = Helper::get_home_url(); 
    
    if ( 
    	Sitepress::get()->is_active() &&
    	$sitepress_settings['language_negotiation_type'] == 2
    ) {
    	$home_url = get_home_url();
    }
    
    $link = trim( str_replace( $home_url, '', get_permalink() ), '/' );
    

2 응답 에게 “Rank Math SEO - "Remove Base" Option Causes Redirection Issues”

답장을 남겨주세요

주제를 유지하고 다른 사람을 존중하십시오. 이 게시물과 관련 없는 문제에 대한 도움이 필요한 경우 지원 포럼을 사용하여 채팅을 시작하거나 티켓을 제출하십시오.

다음 태그를 사용할 수 있습니다.
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>