I want to pass first directory as a variable and subdirectory as another variable.
It works when for urls with both directories (/something/something2) but I get an error 404 when I try with only one (/something).
RewriteRule ([^/]+)/([^/]+) /posts/?category2=$1&category2=$2 [L,QSA]
How can I pass only category1 when category2 isn't available?