Forum Moderators: phranque
I have a rewrite rule that takes a url like:
/content/home.html
and with a rewriteMap then points it at:
/browse.php?page=NN
That part works brilliantly. What I would now like to do is be able to add a query string to the 'fake' URL and have it pass directly into the rewritten URL.
So:
/content/home.html?foo=true
rewrites to:
/browse.php?page=NN&foo=true
By using the map for the page=NN part and then another rewriteCond or rewriteRule to map the extra query string part.
I have searched far and wide and see there is a way to pass the query string through, but it seems I can't figure out how to combine the rewriteCond with the rewriteMap and the the rewiteRule
Here is what works now.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteLog logs/rewrite_log
RewriteLogLevel 1
RewriteMap categories txt:/lookupTable.txt
RewriteRule ^/content/(.*)$ /browse.php?page=${categories:$1¦2}
</IfModule>
Thanks for any assistance.