Ok, currently to get the URL in the format I want I use this in my .htaccess
RewriteRule ^user.php/([0-9]+)/?$ user.php?id=$1 [NC,L]
RewriteRule ^user.php/edit/([0-9]+)/?$ user.php?id=$1&type=edit [NC,L]
Urls, redirect to
domain/user/7/ -> domain/user?id=7
domain/user/edit/7/ -> domain/user?id=7&type=edit
Works fine, but I want to be able to do better value pair urls instead of just strict matches.
An example is
domain/user/key/value/key/value/key/value/
-> domain/user.php?key=value&key=value&key=value
I was looking at
.htaccess rewrite to convert directories into /key/value/key/value
The example works well if you just want to redirect from the main path, ie localhost/index.php, but I want to only be triggered when it's domain/user and I couldn't get it to match with using 'user' as the trigger
My current .htaccess
# Pretty url's
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
RewriteRule ^user.php/([0-9]+)/?$ user.php?id=$1 [NC,L]
RewriteRule ^user.php/edit/([0-9]+)/?$ user.php?id=$1&type=edit [NC,L]
Is this possible, and if so how?