I want to implement htaccess rewriting for the following criteria
- Url we are having example.com/param1
- Url we are having example.com/param1/param2
For url 1 I need to redirect to example.com/param1.php
For url 2 I need to redirect to example.com/param1/param2.php
How to write the htaccess code for this condition??