apache - .htaccess rewrite regex regular expressions -
my url is:
http://www.domain.com/seattle_wa_math it needs point to:
http://www.domain.com/list.php?city=seattle&state=wa&s=math here's have far, doesn't work...
rewriterule ^[a-za-z_\-]+_[a-z]{2}_[a-za-z0-9_\-\(\)]+\/$ list.php?city=$1&state=$2&$s=$3 [l]
this should it:
rewriterule ^([a-za-z\-]+(?:_[a-za-z\-]+)*)_([a-z]{2})_([a-za-z0-9_\-\(\)]+)\/?$ list.php?city=$1&state=$2&$s=$3 [l] allows multiple worded citys , subjects , optional trailing / path.
Comments
Post a Comment