I'm trying to do a redirect if a user goes to (the book_id and course_id numbers aren't constant):
www.mydomainname.com/admin_stuff/add_student.php?book_id=20&course_id=30
to a secure link using:
RewriteEngine on
RewriteCond %{QUERY_STRING} ^book_id=([0-9]*)&course_id=([0-9]*)$
RewriteRule add_student.php https://mydomainname.com/admin_stuff/add_student.php?%1 [R=301,L]
where the redirect is placed in an .htaccess file inside of the admin_stuff folder.
While a redirect occurs, it goes to:
instead of
https://mydomainname.com/admin_stuff/add_student.php?book_id=20&course_id=30
Any help pointing me in the right direction would be appreciated.
- Eric