Once upon a time, old version of Zenphoto used a standard .htaccess file to manage page URL rewriting and redirects.
After updating my instance of Zenphoto, all of the URL rewriting is carried out by rewrite.php, with the rules defined in the zenphoto-rewrite.txt file.
On my Zenphoto instances I used to use a lot of custom .htaccess rules to make custom pages work. With the change to how rewriting works, these are now broken, and I'm trying to get my head around the new engine.
I'm curious as to the reason for the change in the rewriting engine - I'm assuming there were some benefits to it, otherwise it would never have been done.
Comments
Now I just need to rewrite my old code to use the same patterns. :-D
Of course you really could continue to use your old code. Any "query" link or link to something other than index.php will still work. You just don't need the old Zenphoto code (but it will not hurt to leave it.)
It is relatively straight forward to add rules via plugins. Here is a simple plugin to create a "stand-alone" link to a custom page:
`<?php
/* Rredirects "MyPage"
*
* @package plugins
* @subpackage MyPage
*/
$plugin_is_filter = 5 | CLASS_PLUGIN;
$plugin_description = gettext('Redirect link');
$plugin_author = "Stephen Billard (sbillard)";
$plugin_version = '1.4.5';
$_zp_conf_vars['special_pages']['MyPage'] = array('define' => false, 'rewrite' => 'MyPage', 'rule' => '^%REWRITE%/*$ index.php?p=pages&title=MyPage[L,QSA]');
?>
More complex examples may be found in the zenphoto plugins that make special links. E.g. the `favoritesHandler` and even (most complex) the `zenpage` plugin.