Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › ajax search pro and weglot
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 1 week, 2 days ago.
- AuthorPosts
- March 15, 2023 at 8:16 pm #41802
I have a problem with the ajax search pro plugin and weglot because in the home page when I change the language, for example to spanish, I do a search and the result is still shown in english, and I have a new page with the same section and there it translates everything in any language.
March 17, 2023 at 11:04 am #41824Hi,
Thanks for the details. I must note that officially only WPML and Polylang are supported, but in this case I believe Weglot could work, as the issue is probably not related to it.
There seems to be a server side mod_rewrite redirection which removes the translate tag from the URL completely, whenever the plugin makes a request. The request is automatically redirected to the wrong URL.
For example, if you try this URL:
https://americanos.ca/pt/?asp_ls=&asp_active=1&asp_force_reset_pagination=1&p_asid=3&p_asp_data=1&termset[product_cat][]=26&aspf[region-cat__2]=Alberta&filters_initial=0&filters_changed=0&qtranslate_lang=0&woo_currency=CAD¤t_page_id=8
..it is redirected to this:
https://americanos.ca/?asp_ls&asp_active=1&asp_force_reset_pagination=1&p_asid=3&p_asp_data=1&termset%5Bproduct_cat%5D%5B0%5D=26&aspf%5Bregion-cat__2%5D=Alberta&filters_initial=0&filters_changed=0&qtranslate_lang=0&woo_currency=CAD¤t_page_id=8
And this is sort of an encoded version, but it has the
Best,/pt/
language tag removed as well.
The issue is caused by this 301 redirect rule with URL encoding. I suggest checking your .htaccess file to see if there is a redirect rule in relation with these types of URLs.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 22, 2023 at 10:25 pm #41930Checking my htaccess I don’t have any rule to remove the translation of that section, any solution?
March 23, 2023 at 4:04 pm #41938I did not mean removing the translation. I mean, that the server redirects back automatically to the english version, whenever you visit the page with any query arguments, like so.
Best,
Try visting https://americanos.ca/pt/?xy=
it will automatically redirect to the english version: https://americanos.ca/?xy=
The server removes the “/pt/” URL part. That is either done via htaccess mod_rewrite, or via custom rewrite rules somewhere in a custom code.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.