I have following .htacess code which allow three $_GET parameters to show in pretty manner
RewriteRule ^search/([a-zA-Z0-9-_%]+)/([a-zA-Z0-9-_%]+)/([a-zA-Z0-9-_%]+)/(.*)$ search.php?name=$1&city=$2&age=$3 [L]
RewriteRule ^search/([a-zA-Z0-9-_%]+)/([a-zA-Z0-9-_%]+)/(.*)$ search.php?name=$1&city=$2 [L]
RewriteRule ^search/([a-zA-Z0-9-_%]+)/(.*)$ search.php?name=$1 [L]
The url will look like domain.com/search/name/city/age
but I want to add more dynamic filters like domain.com/search/name/city/age?gender=male
now my .htaccess don't treat ?gender=male
as normal get parameters. If I print all $_GET values in php using print_r($_GET)
, it will show me only $_GET values that I have written in .htaccess
What could be the solution?