The above breaks down as:
1: (href|action) the word 'href' or 'action'
: =["'] literally = followed by a quote or apostrophe
2: (.*/)? zero or more of characters ending in a slash, that all may or may not exist
: [\w\-\_]+ one or more word-type characters, dash, or underscore
: . a period (technically any one character)
: [a-z]+ one more letters a-z
: \?_a\= literally ?_a=
3: ([\w]+) one or more word-type characters -- this will be the action verb as listed in the generatePath() function
: \& literally &
4: (amp;)? literally amp; that all may or may not exist
5: ([\w]+) one or more word-type characters -- this will be the key related to the target of the action verb
: \= literally =
6: ([\w\-\_]+) one or more word-type characters, dash, or underscore -- this will be the value for the key related to the target of the action verb
7: ([^"\']*) zero or more characters that is not a quote or apostrophe -- the rest of the querystring
: ["'] a quote or apostrophe
action="anything/anything/an-th_ng.sufx?_a=product&product_id=40001&the_rest"
( 1 ) ( 2 ) ( 3 )4( 5 ) ( 6 )( 7 )
Note that the httpredir argument does not have anything for that which is required to exist after capturing group 2. That thing would typically be index.php. It could also be search and the like.
Without this content, the URL does not get rewritten.
For example, Catalogue class near line 2100:
which goes to functions.inc.php near line 686:
which goes to SEO class near line 619:
The regex pattern breaks down to:
Note that the
httpredir
argument does not have anything for that which is required to exist after capturing group 2. That thing would typically beindex.php
. It could also besearch
and the like.Without this content, the URL does not get rewritten.