• I added the following to my theme’s functions.php:

    function gallery_filter($rules) {
    $newrules['gallery/folder/(.*)'] = 'gallery/sp_index.php?dir=./$1';
    $newrules['gallery/file/(.*)'] = 'gallery/sp_index.php?file=./$1';
    $newrules['gallery/thumb/(.*)'] = 'gallery/sp_getthumb.php?source=./$1';

    $rules = array_merge($newrules,$rules);
    return $rules;
    }
    add_filter('rewrite_rules_array', 'gallery_filter');

    but it only works if I set $use_verbose_rules = true; in classes.php

    Otherwise the reltive links under gallery/ all cause the default front page of wordpress to load.

    It works, but I don’t think this is how things are supposed to work.

    Many thanks to filisofo on other forums for pushing me in the right direction to get as far as I have.

Viewing 1 replies (of 1 total)
  • Thread Starter mailman0

    (@mailman0)

    This issue seems to have been addressed in WP 2.0.2

    Yea WordPress!

    Edit: On closer inspection, I have spoken too soon. It still doesn’t work properly.

Viewing 1 replies (of 1 total)
  • The topic ‘Custom rewrite rules only work if $use_verbose_rules = true;’ is closed to new replies.