Hi, I'm trying to rewrite the urls across a site I'm developing, which pass get variables like the following: localhost/link/link1/page.php?id=12 would look like: localhost/page/12 The first link in the htaccess file works fine, but the following ones don't (whatever the order, the first one works). Can anyone tell me why/help me solve it please? I'm attaching a snippet of the file here: # http://localhost/html/content_quiz/quiz-results.php?quizid={number} # to # http://localhost/results/quiz/{number} RewriteRule ^results/quiz/([0-9]+)/?$ /html/content_quiz/quiz-results.php?quizid=$2 [NC,L] # http://localhost/html/content_pages/results.php # to # http://localhost/results RewriteRule ^results/?$ /html/content_pages/results.php [NC,L] # http://localhost/html/content_quiz/grade.php?quizid={number} # to # http://localhost/quiz/{number}/grade RewriteRule ^quiz/([0-9]+)/grade/?$ /html/content_quiz/grade.php?quizid=$3 [NC,L] Code (markup): At the moment, it goes up to $6, but more will be added later on in development.
I managed to get it working. It seems that I needed to leave $1 for all of them. I guess it's because it only executed the one line before ending?