Hi :) There is no better method to explain that one compared to example.

USUAL Situation

I personally use this rewrite rule:

RewriteRule ^(.+)(\?.+)?$ index.php?params=$1 [L]

To behave like:

# abc.com/home      =>      abc.com/index.php?params=home

However, this discards any pre-existing GET parameters, so with:

http://localhost/ajax/workouts/getExerciseDetails?exerciseID=41

I recieve:

params=ajax/workouts/getExerciseDetails

After I need:

params=ajax/workouts/getExerciseDetails&exerciseID=41

SO... My question in British is: It is possible to method to conditionally append any pre-existing GET params (also known as the string following the '?') towards the alternative But still satisfy my primary utilization of this regex?

If the can't be completed in exactly the same rewrite rule, possibly while on an if/then/else?

Thanks!

Just set the QSA flag to obtain the original query instantly appended towards the new:

RewriteRule ^(.+)$ index.php?params=$1 [L,QSA]