Rewrite query string parameter into URL Apache
问题 URL coming into Apache: localhost:8888/game?level=0 URL that should be coming out of apache: localhost:8888/level0/game Could someone kindly help me to create this rewrite ? Tried to solve it with following: RewriteEngine On RewriteRule ^game\/+(.*?)\?+level=+([0-9]+) /level$2/$1 [L,QSA] With no luck since it does not match. Thanks, Peter 回答1: To be able to capture values from the query string, you need a RewriteCond %{QUERY_STRING} directive, so that captured group will be available as %n