I need some help to write a dynamic rule where i can add name/value pair separated by ‘/’ instead of name1=value&name2=value2
e.g
http://www.example.com/jeans.html?color=24&manufacturer=3
http://www.example.com/jeans/color/black/manufacturer/jonh-miller.html
&
http://www.example.com/jeans.html?color=24&manufacturer=3&size=1
http://www.example.com/jeans/color/black/manufacturer/jonh-miller/size/xl.html
and so on.
can any one point me to some good documentation ?
Thanks
Use RewriteMap
http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritemap
You should first match the parameters then use the maps, for example:
This should match the case:
http://www.example.com/jeans.html?color=24&manufacturer=3
and rewrite it to:
http://www.example.com/jeans/color/black/manufacturer/jonh-miller.html
Please note: This solution needs a map for each parameter and a rewrite for each final path.