Pretty URL via htaccess using any number of parameters

Viewed 2172

Actually i have this URL:

http://www.example.com/index.php?site=contact&param1=value1&param2=value2&param3=value3

But i want to have this URL format:

http://www.example.com/contact/param1:value1/param2:value2/param3:value3

So the "contact" goes to variable $_GET["site"] and rest of parameters should be able to access via $_GET["param1"], $_GET["param2"] etc. The problem is, it has to work with any number of parameters (there could be param4 or even param50 or any other name of parameter). Is it possible via htaccess to cover all these cases?

5 Answers
Related