I am trying to get variables from URLs, rewritten by htaccess and which are passed on using GET. At the moment I have: Options +FollowSymLinks RewriteEngine On RewriteRule ^eating-out.php?sort=(.+)&page=(.*)$ dev1.php?cat=1&sort=$1&page=$2 PHP: Which is getting me a 404 error page when I access eating-out.php.. meaning the page isn't found. However, if I use this: Options +FollowSymLinks RewriteEngine On RewriteRule ^eating-out.php dev1.php?cat=1 PHP: And try and access eating-out.php?page=2 it won't work.. the value of $_GET['page'] is still nothing. Any ideas?
Also replied on NP: The first one isn't working because sort and page are part of the query strings. You should only need to add [QSA] to append the query string to the second rewrite: RewriteRule ^eating-out.php dev1.php?cat=1 [QSA] Code (markup): or better yet RewriteRule ^eating\-out\.php$ /dev1.php?cat=1 [L,QSA] Code (markup):