*

calm

  • ***
  • 22 posts
categories languages nginx
« on: September 01, 2017, 10:24:00 AM »
Hello!
After all night testing Im sure problem is related to ngnix server configuration.
I have nginx server, configuration should be ok (other cms works).
rewrite directive is correct:
location / {
        try_files $uri $uri/ /index.php?$args;
    }

problem:
If I swich language (I have 2 languages) when Im on categories appears error.
for example:

https://mysite.com/category-name-in-language-1
now I wanna switch this page to second language, so content should change and url change to
https://mysite.com/category-name-in-language-2

but what happens:
after switching to second language url doesnt change and in content appears:
" Whoops, something is wrongWe are sorry, but the Web address you have entered is no longer available.".

If I go to listing:
https://mysite.com/category-name-in-language-1/listing_in_language_1 and change to second language everything is ok, url changes to:
https://mysite.com/category-name-in-language-2/listing_in_language_2


so the problem appears only in categories.
I tested on new installations, etc. with and without listing, with subcategories - all the same.

I googled trying to find solution - nothing (rewrite directive above).

Maybe someone have nginx and can help me???

there can be confusing situations for users and I think this error can destroy seo.


I was so long searching for solution, that I dont believe, I will resolve this probl.

Maybe, there is another solution:
most people, logically, choose language on homepage (because this is main and first page), is there possibility show language block only on home page?

Marked as best answer by calm on September 03, 2017, 10:28:30 PM
*

MB Themes

Re: categories languages nginx
« Reply #1 on: September 02, 2017, 04:54:53 PM »
@calm
To show block for languages just on homepage, you can wrap it with:

Code: [Select]
<?php if(osc_is_home_page()) { ?>
  ... block ...
<?php ?>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

calm

  • ***
  • 22 posts
Re: categories languages nginx
« Reply #2 on: September 03, 2017, 10:28:21 PM »
thanks for replay @frosticek!

I figured this too by myself ((so much hours...)) if I I would know, that You will replay, eh)!! :)


*

MB Themes

Re: categories languages nginx
« Reply #3 on: September 04, 2017, 07:59:06 AM »
@calm
Welcome ;)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots