Force Lower-Case URLs with mod_rewrite

You may find yourself in a situation at some point where you need to ensure that all access to your site is done using lower-case only. This may be because of SEO (avoiding duplicate content), or perhaps you want to ensure that you can seamlessly move between case-sensitive/insensitive operating systems. If you are running a standard LAMP stack, you're in luck. Apache's mod_rewrite can be used to 301-redirect all incoming requests to their lower-case counterparts with just a few configuration directives.

Read the rest of this entry »

Comments

Extracting Translatable Strings From Zend_Validate

Recently I started working with Zend Framework's Zend_Form and its integrated automatic translation functionality using Zend_Translate. In general, the functionality is really great, but if you have ever tried to translate all of the possible validation error messages, you know that finding them can be a long manual task. Naturally, I brought this up on #zftalk, and the consensus seemed to be that the translatable messages could be extracted using a little PHP and ReflectionClass magic.

Read the rest of this entry »

Comments

Benchmarking Zend Framework Routes

Hanging out in #zftalk on freenode is a great way to learn more about using Zend Framework, if you're not already there get yourself an IRC client and sign on. Recently, the following question was posed:

How can I create a route with an optional parameter; e.g /search/:foo/:bar, where :bar is optional? Do I need to create two different routes?

Several users correctly suggested specifying a default value for :bar when constructing the route, and it was also mentioned that both standard routes and regular expression routes could be used to solve the problem. Naturally, this lead to a discussion of which type of route would be fastest, with no real numbers to fall back on.

Read the rest of this entry »

Comments (5)

Migrating to Zend Framework: Legacy Scripts

Migrating an existing PHP application to Zend Framework can be a daunting task, especially if the migration must occur all at once. It is much easier to migrate the application in sections over a longer period of time. This approach requires some modification from a normal Zend Framework setup

Read the rest of this entry »

Comments (5)

Configuring mod_rewrite for the Front-Controller Pattern

When installing or creating a web application that implements the front controller pattern on an apache server, it is common to use mod_rewrite to redirect all traffic for non-existent resources to a the central dispatch file acting as the front controller. Depending on where your decide to place your mod_rewrite rules, the required syntax can differ.

Read the rest of this entry »

Comments

Using Module Templates with Zend Framework

I've just finished watching some of the archived webinars related to Zend Framework over at Zend.com, and found some great information about rendering view output into a sitewide template in the MVC applications with Zend Framework webinar.

Since I'm currently developing a website with multiple modules, each having their own distinct look, I'd like to extend the examples provided in the webinar to allow specifying per-module templates. Here is what I came up with:

Read the rest of this entry »

Comments

Migrating mail from Evolution on Linux

Migrating mail from one installation of Novel Evolution (formerly Ximian Evolution) to another is possible, but if not done carefully it is easy to lose messages and corrupt files. The simplest method, and the most error prone is probably just to copy the .evolution directory from one machine to another. The problem with doing that is that you will be carrying over all of the internal indices and data files created by Evolution, in addition to the actual mail files. If you are migrating to a different version of Evolution, or if the target installation is already set up with its own data directory, you are very likely going to cause problems.

Read the rest of this entry »

Comments

Using The Audiovox DC400 DV Camcorder With Linux

Audiovox DC400 DV Camcorder

I was going through my collection of random electronic devices recently, and came across an Audiovox DC400 DV camcorder that I had acquired awhile back. The DC400 is an affordable camcorder with limited functionality... perfect for a webcam. I decided to get it set up on my Fedora Core 6 linux machine so that I could use the video conferencing functionality of Ekiga.

Read the rest of this entry »

Comments