/ DEFINE REWRITE RULES
function fn_get_rewrite_rules()
{
global $settings, $customer_index;
$lang_rule = ($settings['Addons']['seo_opts']['seo_language'] == 'Y') ? '([a-z]{2})/' : '()';
$function = __FUNCTION__;
include CORE_DIR . 'addons_inheritance.php';
$rewrite_rules['!^(.*)?/'.$lang_rule.'catalog\.html$!'] = '$customer_index?mode=catalog&sl=$matches[2]';
$rewrite_rules['!^(.*)?/'.$lang_rule.'sitemap\.html$!'] = '$customer_index?target=sitemap&sl=$matches[2]';
$rewrite_rules['!^(.*)?/'.$lang_rule.'(.*/)?([^/]+)-page-([0-9]+|full_list)\.html$!'] = 'object_name=$matches[4]&page=$matches[5]&sl=$matches[2]';
$rewrite_rules['!^(.*)?/'.$lang_rule.'(.*/)?([^/]+)\.html$!'] = 'object_name=$matches[4]&sl=$matches[2]';
if ($lang_rule != '()') {
$rewrite_rules['!^(.*)?/'.$lang_rule.'$!'] = '$customer_index?sl=$matches[2]';
}
if ($settings['Addons']['seo_opts']['seo_category_type'] == 'category') {
$rewrite_rules['!^(.*)?/'.$lang_rule.'(.*/)?([^/]+)/page-([0-9]+|full_list)(/)+$!'] = 'object_name=$matches[4]&page=$matches[5]&sl=$matches[2]';
$rewrite_rules['!^(.*)?/'.$lang_rule.'(.*/)?([^/?]+)/?$!'] = 'object_name=$matches[4]&sl=$matches[2]';
} else {
$rewrite_rules['!^(.*)?/'.$lang_rule.'(.*/)?([^/?]+)/?$!'] = 'object_name=_wrong_path_&sl=$matches[2]';
}
$rewrite_rules['!^(.*)?/$!'] = '';
return $rewrite_rules;