Jump to content

[Resolved] Problem with Arabic letters (mod_rewrite)


snafy

Recommended Posts

There should be an old Github issue (possibly carried over from an old tech support report) that discussed the need to use rawurlencode( 'the mb_string' ) these SEO phrases before sending them out as links.

In the meantime, you will need to override the automatic generation of SEO paths by entering a phrase in the Edit Product, Search Engines tab, Custom SEO URL path text field that will conform to the valid characters used in the world of web addresses.

Link to comment
Share on other sites

can i do automatic generation like that

 

localhost/6/category-id-1/Product-id-1.html


  RewriteCond %{QUERY_STRING} (.*)$
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule tell_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=product&product_id=$1&%1 [NC]

Link to comment
Share on other sites

Realize you may also run into the same problem with arabic-named categories, please try this edit. In the file /classes/seo.class.php:

Near line 306, find:

$path = empty($cat_directory) ? $prods[0]['name'] : $cat_directory.'/'.$prods[0]['name'];

Change to:

$path = empty($cat_directory) ? 'prod_'.$prods[0]['product_id'] : $cat_directory.'/prod_'.$prods[0]['product_id'];

This should affect all new items added to the inventory, and any other item where you blank the Custom SEO URL field.

There is also in admin, Maintenance, Rebuild tab, a "Clear all auto-generated SEO URLs" function.

Link to comment
Share on other sites

You can try this (I haven't tried it). In /classes/seo.class.php:

Near line 393, find:

$this->_cat_path[] = $category['cat_name'];

Change to:

$this->_cat_path[] = 'cat_'.$category['cat_id'];

You may need to find and delete this file: /cache/abcde.seo.category.list.xx

where abcde is a random prefix specific to your store, and xx is the language code.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...