i'm looking for a technique to rewrite the index.php?page=users&id=1
to /users/1/
. I found some snippets for my .htaccess but nothing worked for me. I also reading rewrite doc
I've got $_GET['page']
in my root index.php so my url is index.php?page=users
and inside my users.php
i've got $_GET['id']
so my url is index.php?page=users&id=1
How do I get with rewrite /users/4/
Tried rule is:
RewriteRule ^([0-9]+)\/([0-9]+)$ index.php?page=$1&id=$2