重複の可能性:
クエリ文字列と Mod ReWrite
次の行を正しく変換する .htaccess ファイルを作成しました。
http://localhost/questions/32/new-question-from-peter
の中へ
http://localhost/questions.php?question_id=32.
私が使用するコードは
RewriteRule ^questions/([0-9]+)/[^/]*(?:\?(.+)=(.*))?$ public/questions.php?question_id=$1&$2=$3 [NC,L]
ただし、URLが以下の場合、
http://localhost/questions/32/new-question-from-peter?page= <int>
私のURLが
http://localhost/questions.php?question_id=32&page=2
それは完全に機能します。
誰かがこれを手伝ってくれますか、私のコードのどこが間違っていますか