Apache mod rewrite .htaccess to get params
问题 How can i catch the prams after file name with extension like service.php/view1 for ex: service.php/newview1 I want to get it like service.php?view=newview1 how do i write mod-rewrite for this I tried like RewriteRule ^services.php/?([a-zA-Z_]+)$ /services.php?category=$1 its not matching the service.php/newview1 回答1: When the replacement URI contains a query string, the default behavior of RewriteRule is to discard the existing query string, and replace it with the newly generated one. Using