Great Video, thanks!

But i think that the rules prioritys are OK.
All other stuff will work fine.
The order for the rewrites are set by default from cherokee, right?
So my default handler ist redirection and looks like this:

^/Content([1-9][0-9]*).*  ==> artikel.php?id=$1

^/forum/([-_!~*'()$a-zA-Z0-9]+)/(?:\?(.*))?$ ==> 
forum/index.php?pretty;board=$1.0;$2

^/forum/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*)/(?:\?(.*))?$  ==> 
forum/index.php?pretty;board=$1.$2;$3

^/forum/([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/(?:\?(.*))?$ ==> 
forum/index.php?pretty;board=$1;topic=$2.0;$3

^/forum/([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*|msg[0-9]*|new)/(?:\?(.*))?$
 
==> forum/index.php?pretty;board=$1;topic=$2.$3;$4

^/forum/profile/(.+?)/ ==> forum/index.php?pretty;action=profile;u=$1

This is the original order in my cherokee configuration. All substitutions 
work but profiles.

Regards

Sven

----- Original Message ----- 
From: "Alvaro Lopez Ortega" <[email protected]>
To: "creadoo - Sven Rißmann" <[email protected]>
Cc: <[email protected]>
Sent: Friday, November 20, 2009 10:53 AM
Subject: Re: [Cherokee] little problem with rewrite


On 20/11/2009, at 10:46, creadoo - Sven Rißmann wrote:

> i want to display the Profiles of my forums in a way like: 
> http://www.domain.com/forum/profile/username/
> Here is what i've tried:
>
> Regex:
> ^/forum/profile/([^/]+)/(?:\?(.*))?$
> Substitution:
> forum/index.php?pretty;action=profile;u=$1;$2

I'd use something like..

Regex: ^/forum/profile/(.+?)/
Substitution: /forum/index.php?pretty;action=profile;u=$1

--
Octality
http://www.octality.com/

_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee

Reply via email to