I would like to forward users using .htaccess
When they visit the page: http://www.example.com/add_event/
Redirect to: http://www.example.com/index.php?cmd=add_event
I’ve got the following code that works fine:
RewriteRule ^add_event/?$ index.php?cmd=add_event [T=application/x-httpd-php]
The page add_event/ could be opened with GET params. Example: add_event/?id=5&user=superuser
How can I pass the get params as they are? So that in that case the user can be redirected to:
http://www.example.com/index.php?cmd=add_event&id=5&user=superuser
Add ,QSA to your [] options to perform a “Query String Append”
See documentation at http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriterule and http://httpd.apache.org/docs/current/rewrite/flags.html#flag_qsa