Skip to content Skip to sidebar

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 -

Supporter timezone: Europe/Zagreb (GMT+02:00)

Tagged: 

This topic contains 1 reply, has 0 voices.

Last updated by Dražen 2 weeks ago.

Assisted by: Dražen.

Author Posts
April 30, 2026 at 7:30 am #18004630

alexisB-13

Hy, I translated the price page. could not open the link you sent me for the global elements. and now my site is on 404 again..
You simply disappeared... nice...

April 30, 2026 at 7:33 am #18004647

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

For 404 keep happening this usually happens when WPML language directories are being enforced via rewrite rules, and something (often server config or another plugin) keeps regenerating or overriding the `.htaccess`, which then leads to 404 errors.

Please check: https://wpml.org/faq/why-is-htaccess-getting-overwritten-with-the-language-folder-on-my-wpml-website/

As a quick workaround, you can instruct WPML not to add the language folder. To do this, add the following code to your theme’s functions.php file:

add_filter('mod_rewrite_rules', 'fix_rewritebase');
function fix_rewritebase($rules){
    $home_root = parse_url(home_url());
    if ( isset( $home_root['path'] ) ) {
        $home_root = trailingslashit($home_root['path']);
    } else {
        $home_root = '/';
    }
  
    $wpml_root = parse_url(get_option('home'));
    if ( isset( $wpml_root['path'] ) ) {
        $wpml_root = trailingslashit($wpml_root['path']);
    } else {
        $wpml_root = '/';
    }
  
    $rules = str_replace("RewriteBase $home_root", "RewriteBase $wpml_root", $rules);
    $rules = str_replace("RewriteRule . $home_root", "RewriteRule . $wpml_root", $rules);
  
    return $rules;
}

Let me know how it goes.

Kind regards,
Dražen

The topic ‘[Closed] Split: getting 404’ is closed to new replies.