Appreciate the help in advance because I absolutely hate mod_rewrite and can't get my head around it!
I currently have a rule in my .htaccess that converts two parameters in a query string to a pretty URL.
RewriteRule ^projects/([^/]+)/([^/]+)/?$ single-project.php?id=$1§ion=$2 [L]
For example, this converts the URL /single-project.php?id=5§ion=documents into /projects/5/documents/
What I want to do is have an additional query string (through a new rule) that would convert /projects/5/documents/?subfolder=PDFs into /projects/5/documents/PDFs/
A few caveats:
- This additional query string may not always be there
- This query string would only need to work if the URL is /projects/[ANY_ID]/documents/
I hope this makes sense and that you can help!
Cheers