On Tue, Nov 17, 2009 at 8:23 AM, John Alberts <[email protected]> wrote: > Hi everyone. This is my first post to this list and I'm a new Cherokee user. > I don't know if I've come across a bug or just my ignorance in how to > configure the list of rules when using the redirection handler. > As I add redirection rules using the cherokee-admin web interface, the > rules see to be added in a specific order that can't be changed. > Sometime a rule that I add is put in the middle of the existing rules. > The problem is that the rules appear to match from top down. This > makes it impossible to have a list of rules that specify redirections > that go from very specific url's at the top and have a generic > redirect at the bottom. I don't see any way of changing the order of > rules in the gui. > So, what I did was create the rules using the gui, and then I manually > edited the /etc/cherokee.conf file and re-ordered the rules how I > wanted them. The redirection handlers then worked as I expected them > to. If I then again try to use the gui to add more rules, it will > move the rules back to how it wants to order them and I'll have to > manually change things again. > Am I just not doing something right? > > The rules I'm adding are for dokuwiki. Below is what I have in the > order I want them in the /etc/cherokee.conf file. These rules work > fine as shown below. If I decide to now go into the web gui and add > another rewrite rule, it will reorder what I have below. > > vserver!10!rule!600!handler = redir > vserver!10!rule!600!handler!rewrite!1!regex = ^/$ > vserver!10!rule!600!handler!rewrite!1!show = 0 > vserver!10!rule!600!handler!rewrite!1!substring = /wiki/doku.php > vserver!10!rule!600!handler!rewrite!2!regex = ^/_media/(.*) > vserver!10!rule!600!handler!rewrite!2!show = 0 > vserver!10!rule!600!handler!rewrite!2!substring = > /wiki/lib/exe/fetch.php?media=$1 > vserver!10!rule!600!handler!rewrite!3!regex = ^/_detail/(.*) > vserver!10!rule!600!handler!rewrite!3!show = 0 > vserver!10!rule!600!handler!rewrite!3!substring = > /wiki/lib/exe/detail.php?media=$1 > vserver!10!rule!600!handler!rewrite!4!regex = ^/_export/([^/]+)/(.*) > vserver!10!rule!600!handler!rewrite!4!show = 0 > vserver!10!rule!600!handler!rewrite!4!substring = > /wiki/doku.php?do=export_$1&id=$2 > vserver!10!rule!600!handler!rewrite!5!regex = ^/start\?do=login(.*) > vserver!10!rule!600!handler!rewrite!5!show = 0 > vserver!10!rule!600!handler!rewrite!5!substring = /wiki/doku.php?do=login$1 > vserver!10!rule!600!handler!rewrite!6!regex = ^/start\?do=logout(.*) > vserver!10!rule!600!handler!rewrite!6!show = 0 > vserver!10!rule!600!handler!rewrite!6!substring = > /wiki/doku.php?do=logout$1 > vserver!10!rule!600!handler!rewrite!7!regex = ^/index.php$ > vserver!10!rule!600!handler!rewrite!7!show = 0 > vserver!10!rule!600!handler!rewrite!7!substring = /wiki/doku.php > vserver!10!rule!600!handler!rewrite!8!regex = ^/\?do=search(.*) > vserver!10!rule!600!handler!rewrite!8!show = 0 > vserver!10!rule!600!handler!rewrite!8!substring = > /wiki/doku.php?do=search$1 > vserver!10!rule!600!handler!rewrite!9!regex = ^/([0-9a-zA-Z]+.*) > vserver!10!rule!600!handler!rewrite!9!show = 0 > vserver!10!rule!600!handler!rewrite!9!substring = /wiki/doku.php?id=$1 > > > Thanks for you help. > > > > -- > John Alberts >
-- John Alberts Sorry, I forgot to mention that I am using version 0.99.17 on CentOS 5.3. I know a new version just came out, but I haven't had a chance to install it yet. I also don't see anything in the changelog that addresses the problem I mentioned. John _______________________________________________ Cherokee mailing list [email protected] http://lists.octality.com/listinfo/cherokee
