php - Rewrite Rule not catching strings -
this rewrite rule works fine number variables, not work strings
rewriterule ^\d+$ user.php?user=$0 [l,qsa]
who make rule accepts example:
www.mydomain.com/user/andremendes
right accepts if user/12334 or number.
how make accepts strings , numbers?
try :
rewriterule ^([a-za-z0-9_-]+)/?$ user.php?user=$1 [l,qsa]
to match alphanumbric characters in uri need following regex pattern.
[a-za-z0-9_-]
Comments
Post a Comment