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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -