Here are my two rewrites:
RewriteRule folder/(.*)/$ /folder/subfolder/index.php?s=$1
RewriteRule folder/(.*)/review/$ /folder/subfolder/review.php?s=$1
The first rewrite works perfectly, for example:
http://www.site.com/folder/hello/
But the second:
http://www.site.com/folder/hello/review/
It doesn’t pass the “hello” as the $_GET over.
Why is the second rewrite losing its parameter?
Because it’s reading (.*) to include “…site.com/folder/hello/review/” which then doesn’t match any rewrite rule.
Change the rewrite rule to:
RewriteRule folder/([0-9a-zA-Z-]+)/review/$ /folder/subfolder/review.php?s=$1
That will limit it to alpha-numeric and “-” characters only.