This user has no favorite topics.
Favorite Forum Topics
Forum Topics Created
Status |
Topic
|
Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Avoid htaccess override making website error
Started by: davideM-62
in: English Support
Problem: If this solution does not resolve the issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If problems persist, please open a new support ticket at our support forum. |
|
0 | 4 | 3 weeks, 2 days ago | |
WPML rewriting htaccess and website goes down even with your script
Started by: davideM-62
in: English Support
Problem: RewriteBase /it/ , which should be RewriteBase / . RewriteBase /it/ to RewriteBase / . If you are not using a Child Theme, consider installing one, and add the workaround to the functions.php file. <?php /** * Plugin Name: Custom Rewrite Rules * Description: A custom plugin to fix and force rewrite rules to be applied correctly. * Version: 1.0 * Author: Your Name */ // Hook into 'init' to ensure this runs at the right time add_action('init', 'apply_custom_rewrite_rules', 10); function apply_custom_rewrite_rules() { // Apply custom mod_rewrite rules on 'mod_rewrite_rules' filter add_filter('mod_rewrite_rules', 'fix_rewritebase'); // Flush rewrite rules on plugin activation if (is_plugin_active('custom-rewrite-rules/custom-rewrite-rules.php')) { flush_rewrite_rules(); } } function fix_rewritebase($rules) { // Get home URL and WPML root URL (if applicable) $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 = '/'; } // Replace default home root with wpml root in rewrite rules $rules = str_replace("RewriteBase $home_root", "RewriteBase $wpml_root", $rules); $rules = str_replace("RewriteRule . $home_root", "RewriteRule . $wpml_root", $rules); return $rules; } // Force rewrite rules flush on plugin activation and deactivation register_activation_hook(__FILE__, 'flush_rewrite_rules'); register_deactivation_hook(__FILE__, 'flush_rewrite_rules'); Save this file as custom-rewrite-rules.php and place it in /wp-content/plugins, then activate the plugin. If this solution does not resolve your issue or seems outdated, we recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket at https://wpml.org/forums/forum/english-support/. |
|
0 | 2 | 1 month, 2 weeks ago | |
Why products have been tripled?
Started by: davideM-62 in: English Support |
|
0 | 2 | 3 months, 1 week ago | |
Navigation doesn’t translate
Started by: davideM-62 in: English Support |
|
1 | 17 | 3 months, 1 week ago | |
I just wasted 4 hours trying to translate my website. I am beyond frustration.
Started by: davideM-62 in: English Support |
|
0 | 9 | 3 months, 1 week ago | |
The shop page in english doesn’t display products
Started by: davideM-62
in: English Support
Problem: Solution: |
|
2 | 3 | 1 year, 6 months ago |