how to rewrite a url with two variables using .htaccess
i want rewrite it with a .htaccess i have this url: ../index.php?page=details&id=123456 like this: ../detail/123456 but I do not really know how to do this. Could you help me to rewrite this url? or give me a simple example that I can understand how it works This should work: RewriteEngine On RewriteRule ^detail/([^/]*)$ /index.php?page=details&id=$1 [L] RewriteRule ^(.*)/([0-9]+)$ index.php?page=$1&id=$2&%{QUERY_STRING} The first (.*) selects any string, e.g. "details". ([0-9]+) catches a number, in your case "123456" Finally &%{QUERY_STRING} ensures, that additional parameters are added to