I want to implement htaccess rewriting for the following criteria
- Url we are havi开发者_开发问答ng 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??
RewriteRule ^(param1(/param2)?)$ /$1.php [R=301]
精彩评论