apache rewrite rule with parameters -
i have following url:
http://www.domain.com/results.php?state=wa&city=seattle&sub=algebra i appear as:
http://www.domain.com/results/wa/seattle/algebra and...
http://www.domain.com/results.php?state=wa&city=seattle as
http://www.domain.com/results/wa/seattle i figure write first as:
rewriterule ^results/(.*)/(.*)/(.*)$ /results.php?state=$1&city=$2&sub=$3 [l] but i'm stuck figuring out how combine both of them... slashes throwing me. suggestions?
rewriterule ^results/([^/]+)/([^/]+)/([^/]+)$ /results.php?state=$1&city=$2&sub=$3 [l] rewriterule ^results/([^/]+)/([^/]+)$ /results.php?state=$1&city=$2
Comments
Post a Comment