I have a .htaccess file that is redirecting URLS like this:
RewriteRule ^companies/([0-9]{1,20})/(.*)/?$ /php/company-profile.php?id=$1 [NC,L]
Which matches a URL 'companies/12345/company-name-safe' and grabbing the unique id for company-profile.php.
This works great. But I include a list of jobs by that company on the page, which has pagination & order_by functionality.
So I also need to capture any extra URL params and pass to the php file.
E.g for a url: companies/12345/company-name?page=2&order_by=date+DESC
I don't want to have to change my URL structure if possible, I always want page 1 to be a clean URL without '?id=12345' on the end.
How can I do this?