Hey guys, I am using the following to rewrite URL's for a user's image gallery: Want to achieve: http://www.domain.com/gallery/xxkylexx/ Code (markup): RewriteRule ^gallery/([^/\.]+)/?$ gallery.php?username=$1 [L] Code (markup): This works fine. However, whenever I add additional URL parameters, my PHP code is not detecting them at all. For example: http://www.domain.com/gallery/xxkylexx/?folder=12 Code (markup): if(isset($_GET['folder'])) echo 'folder param set'; else echo 'folder param not set'; PHP: Will return Same thing happens with my pagination parameter: http://www.domain.com/gallery/xxkylexx/?page=2 http://www.domain.com/gallery/xxkylexx/?folder=12&page=2 Code (markup): If I do not use my my-rewrite version of the URL, the script works fine. http://www.domain.com/gallery.php?username=xxkylexx&page=2 http://www.domain.com/gallery.php?username=xxkylexx&folder=12&page=2 Code (markup): Any ideas? Thanks in advance!
Modify the rewrite rule so that it looks like this: RewriteRule ^gallery/([^/\.]+)/?$ gallery.php?username=$1 [QSA,L] Code (markup): The difference is the QSA at the end in the square brackets. QSA stands for "Query String Append". It makes sure that any query strings (The part after the question mark) are correctly added on to the rewritten URL. It will also substitute an ampersand (&) for a question mark (?) if there is already a question mark in the URL.