There is the most long query:
www.site.com/admin/catalog/computers/page3/search/[base64_encode_serialized_array]/filter_by_photo/sorted_by_id/
Modification of the query can be different:
www.site.com/admin/catalog/computers/page3/filter_...www.site.com/admin/catalog/computers/page3/sorted_...etc.
These all URLS are processed, I have now one rule:
RewriteBase /
RewriteRule ^/?admin/catalog/([a-zA-Z]+)/(page([0-9]+)/?)?(search/([a-zA-Z0-9]+)/?)?(filter_by_([a-zA-Z]+)/?)?(sorted_by_([a-zA-Z_]+)/?)?/?$ ./index.php?base=Catalog&dbname=$1&p=$3&search=$5&filter_by=$7&sort_by=$9 [L]
But I feel that it is possible to optimize, and would like to make the handling of the parts separately, but I can't find how to do it, ie something such that, if:
RewriteBase /
RewriteRule ^/?admin/catalog/([a-zA-Z]+)/?$ ./index.php?base=Catalog&dbname=$1 [C]
RewriteRule ^/?page([0-9]+)/? &p=$1 [C]
RewriteRule ^/?search/([a-zA-Z0-9]+)/? &search=$1 [C]
RewriteRule ^/?filter_by_([a-zA-Z0-9]+)/? &filter_by=$1 [C]
RewriteRule ^/?sorted_by_([a-zA-Z0-9]+)/? &sort_by=$1 [L]
I.e. the algorithm should be something like finding the right beginning, and on it hung Supplement. Is it possible? And if so, how?