Sorry, I just detected 2 small errors:

*Cherokee and Wordpress MU (WPMU):*

4 rules need to be added to be processed before any others:

*1 - Rule Type: Regular Expression:*

   - Rule:
      - Regular Expression: ^/blogs/.*files.*$
   - Handler: Redirection
      - Regular Expression: ^/blogs/(.*)files/(.*) to Substitution:
      /blogs/wp-content/blogs.php?file=$2


*2 - Rule Type: Complex:*

   - Rule:
      - Regular Expression: ^/blogs/([_0-9a-zA-Z-]+)/(wp-.*|.*\.php(\?.*|))$
      AND
      - Not ( File Exists, Match any file, disabled all the other checkboxes
      )
   - Handler: Redirection, 2 lines:
      - Type Internal, Regular Expression: ^/blogs/([_0-9a-zA-Z-]+)/(wp-.*)$
      to Substitution: /blogs/$2
      - Type Internal, Regular Expression:
      ^/blogs/([_0-9a-zA-Z-]+)/(.*\.php(\?.*|))$ to Substitution: /blogs/$2

*3 - Rule Type: Regular Expression:*

   - Rule:
      - Regular Expression: ^/blogs/(.*)\.php(\?.*|)$
   - Handler:
      - FastCGI, Information source: PHP Interpreter. All options left as
      default.

*4 - Rule Type: Complex*

   - Rule:
      - Regular Expression: ^/blogs(.*)$ AND
      - NOT ( File Exists, Match any file, disabled all the other checkboxes
      )
   - Handler:
      - Redirection: Internal, Regular Expression: ^/blogs/(.*)$ to
      Substitution: /blogs/index.php


*Notes:
*This is for a WPMU installation in the subfolder "/blogs/". Adjust
accordingly for your own installation.

On Mon, Aug 31, 2009 at 17:03, Urko Masse <[email protected]> wrote:

> Ok, figured it out. There is one more rule to add, in the first place,
> before all the rest, to handle the wp-content links.
>
> Here is the updated "how-to":
>
> *Cherokee and Wordpress MU (WPMU):*
>
> 4 rules need to be added to be processed before any others:
>
> *1 - Rule Type: Regular Expression:*
>
>    - Rule:
>       - Regular Expression: ^/blogs/.*/files.*$
>    - Handler: Redirection
>       - Regular Expression: ^/blogs/(.*)/files/(.*) to Substitution:
>       /blogs/wp-content/blogs.php?file=$2
>
>
> *2 - Rule Type: Complex:*
>
>    - Rule:
>       - Regular Expression:
>       ^/blogs/([_0-9a-zA-Z-]+)/(wp-.*|.*\.php(\?.*|))$ AND
>       - Not ( File Exists, Match any file, disabled all the other
>       checkboxes )
>    - Handler: Redirection, 2 lines:
>       - Type Internal, Regular Expression:
>       ^/blogs/([_0-9a-zA-Z-]+)/(wp-.*)$ to Substitution: /blogs/$2
>       - Type Internal, Regular Expression:
>       ^/blogs/([_0-9a-zA-Z-]+/)/(.*\.php(\?.*|))$ to Substitution: /blogs/$2
>
> *3 - Rule Type: Regular Expression:*
>
>    - Rule:
>       - Regular Expression: ^/blogs/(.*)\.php(\?.*|)$
>    - Handler:
>       - FastCGI, Information source: PHP Interpreter. All options left as
>       default.
>
> *4 - Rule Type: Complex*
>
>    - Rule:
>       - Regular Expression: ^/blogs(.*)$ AND
>       - NOT ( File Exists, Match any file, disabled all the other
>       checkboxes )
>    - Handler:
>       - Redirection: Internal, Regular Expression: ^/blogs/(.*)$ to
>       Substitution: /blogs/index.php
>
>
> *Changes compared to the initial suggestion*
> I have placed the Regular Expression part of the "AND" Complex Rules first,
> from my programming experience that would hopefully be faster than hitting
> the filesystem all the time, specially since I/O cache is disabled in the
> Not File Exists part. That is if Cherokee does shortcut evaluation of the
> rules (I hope it does!).
>
> Any feedback/suggestions?
>
>
> On Mon, Aug 31, 2009 at 13:43, Urko Masse <[email protected]> wrote:
>
>> Mmmm... I think I was doing the victory dance a bit too early. I'm having
>> problems with embedded images.
>>
>> Matt, I have noticed that the rules as you wrote them on your post are
>> different from the screenshots you sent.
>> In particular, the first rule, the first handler, in your email, you said:
>> Handler Internal Redirection:
>> ^/([_0-9a-zA-Z-]+)/(wp-.*)$ to ^/([_0-9a-zA-Z-]+/)/(.*\.php(\?.*|))$
>> (which I think is wrong, as I don't see any $1 or $2 in the substitution
>> string)
>> And in your screenshot it was redirection to /$2.
>>
>> Not sure if it was related, I'm just mentioning it.
>>
>> In any case, I used /$2 (with /blogs before it). And everything works,
>> except the embedded images. Which probably means that all the embedded
>> content, uploaded to the local server, doesn't work either.
>>
>> I wish I knew what is the proper, actual, after all redirection rules are
>> applied in Apache, URLs that WPMU needs...
>>
>> Any ideas are welcome.
>> --
>> Urko Masse
>> +84-90-9088876
>>
>> Ted Turner <http://www.brainyquote.com/quotes/authors/t/ted_turner.html> - 
>> "Sports is like a war without the killing."
>>
>> On Fri, Aug 28, 2009 at 17:19, Urko Masse <[email protected]> wrote:
>>
>>> Hi there,
>>>
>>> I got it to work, at least in a test server. My setup is slightly
>>> different than yours, so I had to adjust the regular expressions a bit, also
>>> to prevent conflicts with the other stuff on the server. My WPMU is
>>> installed in a /blogs/ subfolder.
>>>
>>> *Cherokee and Wordpress MU (WPMU):*
>>>
>>> 3 rules need to be added to be processed before any others:
>>>
>>> *1 - Rule Type: Complex:*
>>>
>>>    - Rule:
>>>       - Regular Expression:
>>>       ^/blogs/([_0-9a-zA-Z-]+)/(wp-.*|.*\.php(\?.*|))$ AND
>>>       - Not ( File Exists, Match any file, disabled all the other
>>>       checkboxes )
>>>    - Handler: Redirection, 2 lines:
>>>       - Type Internal, Regular Expression:
>>>       ^/blogs/([_0-9a-zA-Z-]+)/(wp-.*)$ to Substitution: /blogs/$2
>>>       - Type Internal, Regular Expression:
>>>       ^/blogs/([_0-9a-zA-Z-]+/)/(.*\.php(\?.*|))$ to Substitution: /blogs/$2
>>>
>>> *2 - Rule Type: Regular Expression:*
>>>
>>>    - Rule:
>>>       - Regular Expression: ^/blogs/(.*)\.php(\?.*|)$
>>>    - Handler:
>>>       - FastCGI, Information source: PHP Interpreter. All options left
>>>       as default.
>>>
>>> *3 - Rule Type: Complex*
>>>
>>>    - Rule:
>>>       - Regular Expression: ^/blogs(.*)$ AND
>>>       - NOT ( File Exists, Match any file, disabled all the other
>>>       checkboxes )
>>>    - Handler:
>>>       - Redirection: Internal, Regular Expression: ^/blogs/(.*)$ to
>>>       Substitution: /blogs/index.php
>>>
>>>
>>> *Changes compared to the initial suggestion*
>>> I have placed the Regular Expression part of the "AND" Complex Rules
>>> first, from my programming experience that would hopefully be faster than
>>> hitting the filesystem all the time, specially since I/O cache is disabled
>>> in the Not File Exists part. That is if Cherokee does shortcut evaluation of
>>> the rules (I hope it does!).
>>>
>>> I had to make the 3rd rule complex, adding a Regular Expression to make
>>> sure it only got applied to the /blogs/ part of my server. This makes it
>>> possible to share the virtual server with other web apps.
>>>
>>> I haven't done this in the production server yet, but I'll tackle it on
>>> Monday, as it's way past my time to go home :)
>>> Any feedback?
>>>
>>>
>>>
>>> On Thu, Aug 27, 2009 at 13:10, Urko Masse <[email protected]> wrote:
>>>
>>>> Thanks a LOT!!! :) I'll give it a try and report back.
>>>> --
>>>> Urko Masse
>>>> +84-90-9088876
>>>>
>>>> Stephen 
>>>> Leacock<http://www.brainyquote.com/quotes/authors/s/stephen_leacock.html> 
>>>> - "I detest life-insurance agents: they always argue that I shall some day
>>>> die, which is not so."
>>>>
>>>> On Thu, Aug 27, 2009 at 13:06, Matt Austin <[email protected]>wrote:
>>>>
>>>>> I uploaded some screenshots:
>>>>> http://mattaustin.me.uk/wordpress-mu-cherokee.tar.gz
>>>>>
>>>>> You'll still want to reference my previous email, as some of the
>>>>> regular expressions are cut short in the screenshots as they are
>>>>> longer than the input text box.
>>>>>
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Matt.
>>>>>
>>>>>
>>>>> On Thu, Aug 27, 2009 at 11:38 AM, Urko Masse<[email protected]>
>>>>> wrote:
>>>>> > Hi,
>>>>> >
>>>>> > I think I get what you mean, so I'll give it a try later. It will
>>>>> take me a
>>>>> > while, though, because this time I'll do it on a separate server that
>>>>> I need
>>>>> > to finish setting up.
>>>>> >
>>>>> > If you feel like doing screenshots in the mean time, I'd really
>>>>> REALLY
>>>>> > appreciate it, though :)
>>>>> > Would give me far better chances to get it done right the first time!
>>>>> >
>>>>> > Thanks for your great help!
>>>>> >
>>>>> > 2009/8/27 Matt Austin <[email protected]>
>>>>> >>
>>>>> >> I got Wordpress MU working a while ago (as a test/demo only) using
>>>>> URL
>>>>> >> paths, rather than subdomains...
>>>>> >>
>>>>> >> Permalinks in Wordpress MU are set as the custom:
>>>>> >> /index.php/%year%/%monthnum%/%postname%/
>>>>> >>
>>>>> >> This worked, but it is complicated, and may be over-the-top (can't
>>>>> >> remember too much)...
>>>>> >>
>>>>> >>
>>>>> >> Behaviour Rules
>>>>> >> 1)
>>>>> >> Complex: (Not (File Exists: Any file)) AND (Regular Expression:
>>>>> >> ^/([_0-9a-zA-Z-]+)/(wp-.*|.*\.php(\?.*|))$)
>>>>> >> Handler Internal Redirection: ^/([_0-9a-zA-Z-]+)/(wp-.*)$ to
>>>>> >> ^/([_0-9a-zA-Z-]+/)/(.*\.php(\?.*|))$
>>>>> >> Handler Internal Redirection: ^/([_0-9a-zA-Z-]+/)/(.*\.php(\?.*|))$
>>>>> to /$2
>>>>> >>
>>>>> >> 2)
>>>>> >> Regular Expression: ^(.*)\.php(\?.*|)$
>>>>> >> Handler: FastCGI
>>>>> >>
>>>>> >> 3)
>>>>> >> Complex: Not (File Exists: Any file)
>>>>> >> Handler Internal Redirection: ^/(.*)$ to /index.php
>>>>> >>
>>>>> >> 3)
>>>>> >> Default, List & Send
>>>>> >>
>>>>> >>
>>>>> >> If you'd prefer me to take screenshots of the behaviour settings,
>>>>> then
>>>>> >> just let me know :P
>>>>> >>
>>>>> >>
>>>>> >> Cheers,
>>>>> >>
>>>>> >> Matt.
>>>>> >>
>>>>> >>
>>>>> >> 2009/8/27 Urko Masse <[email protected]>
>>>>> >> >
>>>>> >> > So... Did anybody ever get Wordpress MU to work with Cherokee? :)
>>>>> >> >
>>>>> >> > I'm trying to run it in a /blogs/ subfolder, not as a virtual
>>>>> server
>>>>> >> > in the root folder. Though I guess I could change that with some
>>>>> work.
>>>>> >> >
>>>>> >> > Necesito ayuda! (I need help!)
>>>>> >> >
>>>>> >> > On Sep 6 2008, 4:23 am, Miguel Ángel <[email protected]> wrote:
>>>>> >> > > Hi :)
>>>>> >> > >    the problem on these rules, as antonio says, is that
>>>>> wordpress
>>>>> >> > > creates file irks dinamically. I'm not sure about worspress but
>>>>> that
>>>>> >> > > happened to me with wordpress mu.
>>>>> >> > >
>>>>> >> > >      I think that some rewrite rules could be only translates if
>>>>> we
>>>>> >> > > get those kind of conditionals: "-f" it's not a file, and "-d"
>>>>> it's
>>>>> >> > > not a directory . Other way could be putting the static files as
>>>>> first
>>>>> >> > > rules and leting it fallback on the rewrite when the file
>>>>> doesn't
>>>>> >> > > exist.
>>>>> >> > >
>>>>> >> > > Miguel Ángel
>>>>> >> > >
>>>>> >> > > El 05/09/2008, a las 20:22, "Antonio Pérez" <
>>>>> [email protected]>
>>>>> >> > > escribió:
>>>>> >> > >
>>>>> >> > >
>>>>> >> > >
>>>>> >> > > > On Fri, Sep 5, 2008 at 8:15 PM, Alvaro Lopez Ortega
>>>>> >> > > > <[email protected]> wrote:
>>>>> >> > >
>>>>> >> > > >>> I need it too :) I still have it on my pending tasks ':)
>>>>> >> > >
>>>>> >> > > >> Guys, I'm pretty sure you are gonna love the new 'wizards'
>>>>> feature
>>>>> >> > > >> shipped
>>>>> >> > > >> with the upcoming Cherokee 0.9 :-)
>>>>> >> > >
>>>>> >> > > > I hope!, I hope!... :D
>>>>> >> > >
>>>>> >> > > >>>> I'm trying to use my custom permalinks in Wordpress and I
>>>>> need to
>>>>> >> > > >>>> "emulate" this behaviour in Cherokee.
>>>>> >> > >
>>>>> >> > > >> This is something you can configure with the "Behavior"
>>>>> section of
>>>>> >> > > >> your
>>>>> >> > > >> Virtual Server.
>>>>> >> > >
>>>>> >> > > >> It first look, I'd say that something like this could be
>>>>> enough:
>>>>> >> > >
>>>>> >> > > >> - Extension    php         "FastCGI"
>>>>> >> > > >> - Directory    /images     "Static content"
>>>>> >> > > >> - Directory    /bla, bla   "Static content"
>>>>> >> > > >> - Directory    /lalala     "Static content"
>>>>> >> > > >> - Default      ^.+$        "Redirection"    (to
>>>>> /index.php?$1)
>>>>> >> > >
>>>>> >> > > > Ufff!
>>>>> >> > >
>>>>> >> > > > But this need to add rules every time I create a new
>>>>> directory, or
>>>>> >> > > > file in "/".
>>>>> >> > >
>>>>> >> > > > I think the problem here is how to get those rewrite
>>>>> conditions
>>>>> >> > > > works
>>>>> >> > > > on Cherokee.
>>>>> >> > >
>>>>> >> > > >> Good luck!
>>>>> >> > >
>>>>> >> > > > Anyway, it's a good hack at the moment... Thanks for your
>>>>> help. ;)
>>>>> >> > >
>>>>> >> > > > --
>>>>> >> > > > Saludos:
>>>>> >> > > > Antonio Pérez
>>>>> >> > >
>>>>> >> > > > ATENCIÓN: Antes de imprimir este mensaje valora si
>>>>> verdaderamente es
>>>>> >> > > >  necesario.
>>>>> >> > > > De esta forma contribuimos a la preservación del Medio
>>>>> Ambiente.
>>>>> >> > >
>>>>> >> > > _______________________________________________
>>>>> >> > > Cherokee mailing list
>>>>> >> > > [email protected]://
>>>>> lists.octality.com/listinfo/cherokee
>>>>> >> > _______________________________________________
>>>>> >> > Cherokee mailing list
>>>>> >> > [email protected]
>>>>> >> > http://lists.octality.com/listinfo/cherokee
>>>>> >
>>>>> >
>>>>>
>>>>
>>>>
>>>
>>
>
_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee

Reply via email to