php - Regexp OR operator -
i'm using .htaccess generate nice looking links, , need include or
on slash
so example domain.com/page/12/a/
, domain.com/page/12/a
work
what i've tried:
rewriterule ^page/([^/]*)/([^/]*)(/?)([^/]*) index.php?do=atoz&category=$1&letter=$2&type=$3 [l]
in case simple quantifier ?
zero or one should work.
^page/([^/]*)/([^/]*)(?:/([^/]*))? ## #
edit: might non-matching group can quantify optional. starts ?:
.
Comments
Post a Comment