Advertisement:

Author Topic: Friendly URL can not work for persian rtl language!  (Read 2927 times)

abc500x500

  • Jr. Member
  • **
  • Posts: 96
Friendly URL can not work for persian rtl language!
« on: December 06, 2015, 11:34:41 am »
Hi
osclass = 3.5.9
Panel = Directadmin
Sys= Linux
I asked server admin and he said mod_rewrite is enable.

I put this code to .htaccess file in job.domain.com

and enable friendly url.

Code: [Select]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
But It can not work for persian language!!! but work for english!!!

English content exam:
Code: [Select]
http://job.doamin.com/for-sale/animals
same content in persian:
Code: [Select]
http://job.domain.com//
Please help me for solving this problem.
Thanks
« Last Edit: December 06, 2015, 11:37:33 am by abc500x500 »

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Friendly URL can not work for persian rtl language!
« Reply #1 on: December 06, 2015, 05:12:04 pm »
I think this might help:
Quote
In general URIs as defined by RFC 3986 (see Section 2: Characters) may contain any of the following characters: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~:/?#[]@!$&'()*+,;=. Any other character needs to be encoded with the percent-encoding (%hh). Each part of the URI has further restrictions about what characters need to be represented by an percent-encoded word.

Osclass uses 'slug' for category url, in my setup if I download and activate russian language and I added a russian description for 1 category I can see the url based on the above information ie. in my case it would display something like: http://www.mysite.com/search/%d2%h3%dfsdf%a2/item_i345

Now, in my case I am using a category translation 'fix' which I think makes the url 'work' using those %d chars instead of returning a url like yours like: http://www.mysite.com/search//item_i345

Anyway, I think Osclass will not be able to work correctly with Russian/Persian category translations in url so better turn off friendly urls as mentioned in other threads as well:
http://forums.osclass.org/general-help/permalinks-not-working-in-multi-language-site/
http://forums.osclass.org/3-3-x/permalinks-for-cyrillic/

OR You might want to try this solution found by some other user experiencing the same issue:
http://forums.osclass.org/development/permalinks-translit-for-os-class/


Regards,
Eric

abc500x500

  • Jr. Member
  • **
  • Posts: 96
Re: Friendly URL can not work for persian rtl language!
« Reply #2 on: December 06, 2015, 05:52:21 pm »
I think this might help:
Quote
In general URIs as defined by RFC 3986 (see Section 2: Characters) may contain any of the following characters: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~:/?#[]@!$&'()*+,;=. Any other character needs to be encoded with the percent-encoding (%hh). Each part of the URI has further restrictions about what characters need to be represented by an percent-encoded word.

Osclass uses 'slug' for category url, in my setup if I download and activate russian language and I added a russian description for 1 category I can see the url based on the above information ie. in my case it would display something like: http://www.mysite.com/search/%d2%h3%dfsdf%a2/item_i345

Now, in my case I am using a category translation 'fix' which I think makes the url 'work' using those %d chars instead of returning a url like yours like: http://www.mysite.com/search//item_i345

Anyway, I think Osclass will not be able to work correctly with Russian/Persian category translations in url so better turn off friendly urls as mentioned in other threads as well:
http://forums.osclass.org/general-help/permalinks-not-working-in-multi-language-site/
http://forums.osclass.org/3-3-x/permalinks-for-cyrillic/

OR You might want to try this solution found by some other user experiencing the same issue:
http://forums.osclass.org/development/permalinks-translit-for-os-class/


Regards,
Eric
Hi.
If i want to use friendly url with encoded characters like http://www.mysite.com/search/%d2%h3%dfsdf%a2/item_i345 , what should to do? because currently it show blank and show page not found error.
url = http://job.domain.com// ---> Show page not found
 

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Friendly URL can not work for persian rtl language!
« Reply #3 on: December 06, 2015, 09:28:39 pm »
Well, I *THINK* it is related either to a missing category translation or a translation issue in Osclass for which there is a fix in forums:
http://forums.osclass.org/modern/categories-translation/

In my case, using Osclass 3.5.9. with permalinks ON and ABOVE FIX I simply installed russian language through Admin, I activated the language only for website Front-End, I added a russian phrase for 1 category for testing purpose and I was seeing the '%d....' etc. text in the url for the category in russian where you are seeing the same without that % stuff.

If i want to use friendly url with encoded characters like http://www.mysite.com/search/%d2%h3%dfsdf%a2/item_i345 , what should to do? because currently it show blank and show page not found error.
url = http://job.domain.com// ---> Show page not found

abc500x500

  • Jr. Member
  • **
  • Posts: 96
Re: Friendly URL can not work for persian rtl language!
« Reply #4 on: December 07, 2015, 01:49:30 pm »
Thanks.
But why many other software is not problem like osclass for persian friendly url?
wordpress, joomla, vbulletin?

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Friendly URL can not work for persian rtl language!
« Reply #5 on: December 07, 2015, 06:57:48 pm »
If I knew I would have posted the fix here ;)

Nazar

  • Jr. Member
  • **
  • Posts: 75