Can’t get mod_rewrite to work in Red Hat?

Barcode (detail) by Daniel KulinskiIn an earlier post I pointed out that last little change that you need to make to get Apache’s mod_rewrite working in Ubuntu.

I recently encountered the same thing in Red Hat (well, CentOS) and didn’t remember my own “note to self.” If everything seems right, mod_rewrite is installed and enabled, and you’re sure you understand how to write redirect rules in your .htaccess file, head to /etc/httpd/conf/httpd.conf and change:

AllowOverride None

to

AllowOverride All

Otherwise any other configuration you setup to enable mod_rewrite will be ignored.

Image: Barcode (detail) by Daniel Kulinski

Get Name of Parent Menu Item in Joomla

Tiny Tots' MenuHow to get the name of the current page’s parent from the menu (i.e., get the title of the page one level up) in Joomla 1.5:

$menu = JSite::getMenu();
$parent = $menu->getItem($menu->getActive()->parent)->name;

$menu->getActive()->parent returns the id of the parent, which is why you then have to pass that id to $menu->getItem([id])->name. It would be nice to have a parent() function so that you would only need $menu->getActive()->parent()->name, but I quibble.

Photo: University of Washington Libraries Digital Collections, via Flickr Commons

Can’t get mod_rewrite to work in Ubuntu?

Barcode (detail) by Daniel KulinskiSetting up Apache in Ubuntu and can’t get mod_rewrite to work? You’re sure the module is enabled and a simple test rewrite rule, that you’re positive is correct, is in your .htaccess file?

Are you using the default configuration that comes in recent versions of Ubuntu, /etc/apache2/sites-available/default, or did you copy it to create your own configuration? One little change may cure all your ills.

Continue reading