by default it seems my ZF is separating multiple parameter words with plus signs.
eg. /product/test+product+name
I would like to use -> /product/test-product-name
Here is the line from routes.ini
routes.product.route = "product/:productName"<br />
routes.product.defaults.controller = product<br />
routes.product.defaults.action = product
What can do I do to fix this?
This happens because the URLs are urlencoded to ensure document validity. You’ll need to filter/replace the terms (productName) before generating routes. A simple str_replace should be all that you need. In my app, I filter excess whitespace and then replace spaces with dashes.