What I would like to do is to create a repeating pattern inside a rewriterule. For example:
RewriteRule ^([\w]+)/([\w]+)/(([\w]+)/([\w]+))*/?$ index.php?p=$1&s=$2(&$4=$5)*
Breaking it down:
On every page my ?p=BLA refers to a certain page, and every &s=BLA refers to a certain subpage. The rewriterule for this would obviously be:
RewriteRule ^([\w]+)/([\w]+)/?$ index.php?p=$1&s=$2
But now I want to add custom $_GET data to my url. For example I want to add &search=SEARCH, and I want to add &page=15, and anotherquery=BLA. The rewriterule I just wrote does not support this.
Is there any way to support an unspecified number of arguments in a rewriterule? For example by creating a repeating pattern? Because I don't know how many new arguments I want to add to the URL in advance.