Aaroniker Aaroniker - 3 months ago 7
PHP Question

Some rewrite rules for actions

I got the following rewrite rule:

RewriteRule ^([^/]*)\.html$ /index.php?page=$1 [L]


Now i want to execute some action by a $_GET parameter like this:

domain.de/admin.html?delete-forum=10


But if i dump $_GET it only returns the page parameter.
In the result i want a link like this:

RewriteRule ^admin/delete-forum-([^-]*)\.html$ /admin.html?delete-forum=$1 [L]


Any help? Thanks in advance!

Answer

i've added [L,QSA] to append the query string