<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/zend-framework-custom-route-bl1ij2nbi" -->

---
title: Zend Framework custom route | daily.dev
description: A quick tip from 2006 shows how to create custom routes in Zend Framework to support localized URLs, such as mapping www.example.com/gebruiker/bewerken (Dutch)...
canonical: https://daily.dev/posts/zend-framework-custom-route-bl1ij2nbi
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Zend Framework custom route | daily.dev
og:description: A quick tip from 2006 shows how to create custom routes in Zend Framework to support localized URLs, such as mapping www.example.com/gebruiker/bewerken (Dutch)...
og:url: https://daily.dev/posts/zend-framework-custom-route-bl1ij2nbi
og:image: https://api.daily.dev/og/posts/bL1Ij2NbI.png
og:image:alt: Zend Framework custom route
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Zend Framework custom route

**[Maarten Balliauw](https://daily.dev/sources/maartenballiauw)** · 1 min read · 0 upvotes · 0 comments

## Summary

A quick tip from 2006 shows how to create custom routes in Zend Framework to support localized URLs, such as mapping www.example.com/gebruiker/bewerken (Dutch) back to the user controller's edit action. The approach uses Zend_Controller_Router_Route with addRoute, noting that every action needs its own route and that routes are matched in reverse order, so generic routes should be defined first and specific ones last.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.maartenballiauw.be/posts/2006-11-28-zend-framework-custom-route>

## Questions this post answers

### How do I create a custom route in Zend Framework to support a translated URL like gebruiker/bewerken that maps to a user/edit controller action?

Use the Zend_Controller_Router_Route class and register it with the router's addRoute method, passing a route name, the custom URL pattern, and an array mapping to the real controller and action. For example: $router->addRoute('customroute1', new Zend_Controller_Router_Route('gebruiker/bewerken', array('controller' => 'user', 'action' => 'edit'))). This must be repeated for every action you want localized, and since routes are matched in reverse order, define generic routes first and specific ones last.

_daily.dev surfaces practical routing fixes like this for developers maintaining legacy Zend Framework apps._

## Similar posts on daily.dev

- [New in Symfony 7.4: Decoupled Controller Helpers \(Symfony Blog\)](https://daily.dev/posts/new-in-symfony-7-4-decoupled-controller-helpers-symfony-blog--1my9yzmld) · Symfony · 1 upvotes · 0 comments
- [Don't REST on your Laurels](https://daily.dev/posts/don-t-rest-on-your-laurels-ztyeyqrnr) · RUBYLAND · 0 upvotes · 0 comments
- [Writing Your Own Framework in PHP: Part One](https://daily.dev/posts/writing-your-own-framework-in-php-part-one-fjnnbzvvh) · Dominik Chrástecký · 4 upvotes · 0 comments
- [Laravel Route Binding Behind the Curtains](https://daily.dev/posts/laravel-route-binding-behind-the-curtains-mwca2qdce) · W endell Adriel · 2 upvotes · 1 comments

---

Tags: [#php](https://daily.dev/tags/php)

[View this post on daily.dev](https://daily.dev/posts/zend-framework-custom-route-bl1ij2nbi)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Zend Framework custom route","url":"https://daily.dev/posts/zend-framework-custom-route-bl1ij2nbi","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/zend-framework-custom-route-bl1ij2nbi"},"datePublished":"2026-10-04T13:07:04.923Z","dateModified":"2026-10-04T13:14:56.477Z","description":"A quick tip from 2006 shows how to create custom routes in Zend Framework to support localized URLs, such as mapping www.example.com/gebruiker/bewerken (Dutch)...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/48e29dc5e210332c8a089f810fc3ff86?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/48e29dc5e210332c8a089f810fc3ff86?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Maarten Balliauw","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Maarten Balliauw","logo":"https://media.daily.dev/image/upload/s--rOTg3VYO--/f_auto,q_auto/v1791119043/logos/maartenballiauw?_a=BAMAMicg0","url":"https://daily.dev/sources/maartenballiauw"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/zend-framework-custom-route-bl1ij2nbi","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"php","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Maarten Balliauw","item":"https://daily.dev/sources/maartenballiauw"},{"@type":"ListItem","position":3,"name":"Zend Framework custom route"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/zend-framework-custom-route-bl1ij2nbi#faq","mainEntity":[{"@type":"Question","name":"How do I create a custom route in Zend Framework to support a translated URL like gebruiker/bewerken that maps to a user/edit controller action?","acceptedAnswer":{"@type":"Answer","text":"Use the Zend_Controller_Router_Route class and register it with the router's addRoute method, passing a route name, the custom URL pattern, and an array mapping to the real controller and action. For example: $router->addRoute('customroute1', new Zend_Controller_Router_Route('gebruiker/bewerken', array('controller' => 'user', 'action' => 'edit'))). This must be repeated for every action you want localized, and since routes are matched in reverse order, define generic routes first and specific ones last. daily.dev surfaces practical routing fixes like this for developers maintaining legacy Zend Framework apps."}}]}
```

