Handle $_GET requests with Clean URLs <p>I am have a clear URL based system so the categories will be shown like this </p> <pre><code>http://www.mysite.com/category/23/cat-name </code></pre> <p>Inside the categories page I have some sorting and pages options such as sorting by latests and lower price. Also, I have a pages navigation system</p> <p>The problem is when the request is happening inside the page the <code>$_GET[]</code> doesn't show the variables I need. However it shows in the URL as </p> <pre><code>http://www.mysite.com/category/23/cat-name?page=3 </code></pre> <p>The <code>$_GET</code> variable only shows the id of the category which is in our case now = <code>23</code> and ignored the page number which is in the url.</p> <p><code>.htaccess</code> content</p> <pre><code>RewriteEngine On RewriteRule ^category/([0-9]+)/[a-z][-a-z0-9]*$ cat.php?id=$1 </code></pre>