Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: users

Wordpress and url rewrite

 

 

Cherokee users RSS feed   Index | Next | Previous | View Threaded


aplistas at skarcha

Sep 5, 2008, 10:00 AM

Post #1 of 20 (3215 views)
Permalink
Wordpress and url rewrite

Hi!

Anyone could help me with this .htaccess file?

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

I'm trying to use my custom permalinks in Wordpress and I need to
"emulate" this behaviour in Cherokee.

Thanks in advance!.

--
Saludos:
Antonio P閞ez

ATENCI覰: Antes de imprimir este mensaje valora si verdaderamente es necesario.
De esta forma contribuimos a la preservaci髇 del Medio Ambiente.
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


miguelangel at ajo

Sep 5, 2008, 10:56 AM

Post #2 of 20 (3131 views)
Permalink
Re: Wordpress and url rewrite [In reply to]

I need it too :) I still have it on my pending tasks ':)

Miguel 脕ngel

El 05/09/2008, a las 19:00, "Antonio P茅rez" <aplistas [at] skarcha>
escribi贸:

> Hi!
>
> Anyone could help me with this .htaccess file?
>
> <IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteBase /
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule . /index.php [L]
> </IfModule>
>
> I'm trying to use my custom permalinks in Wordpress and I need to
> "emulate" this behaviour in Cherokee.
>
> Thanks in advance!.
>
> --
> 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
> Cherokee [at] lists
> http://lists.octality.com/listinfo/cherokee
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


alvaro at alobbs

Sep 5, 2008, 11:15 AM

Post #3 of 20 (3139 views)
Permalink
Re: Wordpress and url rewrite [In reply to]

Miguel 脕ngel 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 :-)

> El 05/09/2008, a las 19:00, "Antonio P茅rez" <aplistas [at] skarcha>
> escribi贸:
>
>> Hi!
>>
>> Anyone could help me with this .htaccess file?
>>
>> <IfModule mod_rewrite.c>
>> RewriteEngine On
>> RewriteBase /
>> RewriteCond %{REQUEST_FILENAME} !-f
>> RewriteCond %{REQUEST_FILENAME} !-d
>> RewriteRule . /index.php [L]
>> </IfModule>
>>
>> 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)

Good luck!

--
Greetings, alo
http://www.alobbs.com/
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


aplistas at skarcha

Sep 5, 2008, 11:22 AM

Post #4 of 20 (3130 views)
Permalink
Re: Wordpress and url rewrite [In reply to]

On Fri, Sep 5, 2008 at 8:15 PM, Alvaro Lopez Ortega <alvaro [at] alobbs> 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閞ez

ATENCI覰: Antes de imprimir este mensaje valora si verdaderamente es necesario.
De esta forma contribuimos a la preservaci髇 del Medio Ambiente.
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


aplistas at skarcha

Sep 5, 2008, 12:06 PM

Post #5 of 20 (3127 views)
Permalink
Re: Wordpress and url rewrite [In reply to]

On Fri, Sep 5, 2008 at 8:15 PM, Alvaro Lopez Ortega <alvaro [at] alobbs> wrote:

> - Extension php "FastCGI"
> - Directory /images "Static content"
> - Directory /bla, bla "Static content"
> - Directory /lalala "Static content"
> - Default ^.+$ "Redirection" (to /index.php?$1)

First problem... WordPress use PATH_INFO, so redirection must be:
"/index.php$1", and Cherokee doesn't recognize it as an .php extension
file, so it enters in a loop.


--
Saludos:
Antonio P閞ez

ATENCI覰: Antes de imprimir este mensaje valora si verdaderamente es necesario.
De esta forma contribuimos a la preservaci髇 del Medio Ambiente.
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


miguelangel at ajo

Sep 5, 2008, 2:23 PM

Post #6 of 20 (3136 views)
Permalink
Re: Wordpress and url rewrite [In reply to]

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" <aplistas [at] skarcha>
escribi贸:

> On Fri, Sep 5, 2008 at 8:15 PM, Alvaro Lopez Ortega
> <alvaro [at] alobbs> 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
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


alvaro at gnu

Sep 6, 2008, 2:09 AM

Post #7 of 20 (3120 views)
Permalink
Re: Wordpress and url rewrite [In reply to]

Antonio P閞ez wrote:
> On Fri, Sep 5, 2008 at 8:15 PM, Alvaro Lopez Ortega <alvaro [at] alobbs> wrote:
>>>> 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 "/".

No. That means that you would have to add a new rule whenever you create
a new directory *within your blog directory* (or virtual server).. which
should be certainly something very unusual.

> I think the problem here is how to get those rewrite conditions works
> on Cherokee.

That is not going to happen unless a really good reason comes up. That
is one of those approaches that makes web servers run so slow.

I don't think that you will have to add more of three of four rules to
configure the whole Wordpress thing, so assuming a performance penalty
for saving a couple of rules does not really make sense to me.

Think of it in this way: You spend 15 secs adding the rule, and your
server will run faster during the next N years. It does sound like a
good time inversion, doesn't it?

>> Good luck!
>
> Anyway, it's a good hack at the moment... Thanks for your help. ;)

Independently of whether we could kind of hide it behind a wizard, it is
the way it has been designed to work. There is neither 'hacks' or
'work-arounds' involved on this.

Keep in mind that there are alternative ways of doing things. It does
not matter whether any other web server works in the same way or not.
We are making independent decisions, and that is one of the reasons why
Cherokee is currently outperforming all the rest.

--
Greetings, alo
http://www.alobbs.com/
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


alvaro at gnu

Sep 6, 2008, 2:18 AM

Post #8 of 20 (3117 views)
Permalink
Re: Wordpress and url rewrite [In reply to]

Antonio P閞ez wrote:
> On Fri, Sep 5, 2008 at 8:15 PM, Alvaro Lopez Ortega <alvaro [at] alobbs> wrote:
>
>> - Extension php "FastCGI"
>> - Directory /images "Static content"
>> - Directory /bla, bla "Static content"
>> - Directory /lalala "Static content"
>> - Default ^.+$ "Redirection" (to /index.php?$1)
>
> First problem... WordPress use PATH_INFO, so redirection must be:
> "/index.php$1", and Cherokee doesn't recognize it as an .php extension
> file, so it enters in a loop.

It depends on your configuration whether Cherokee detects the php
extension or not.

Anyway, a few days ago Rui found a bug that might be hitting you with
this. It's related to how the PATH_INFO string is generated. I will get
back to you guys as soon as I fix it on Trunk (hopefully within the next
few days).

--
Greetings, alo
http://www.alobbs.com/
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


aplistas at skarcha

Sep 6, 2008, 2:28 AM

Post #9 of 20 (3114 views)
Permalink
Re: Wordpress and url rewrite [In reply to]

On Sat, Sep 6, 2008 at 11:09 AM, Alvaro Lopez Ortega <alvaro [at] gnu> wrote:

>> But this need to add rules every time I create a new directory, or file in
>> "/".
>
> No. That means that you would have to add a new rule whenever you create a
> new directory *within your blog directory* (or virtual server).. which
> should be certainly something very unusual.

Ok... it's true.

>> I think the problem here is how to get those rewrite conditions works
>> on Cherokee.
>
> That is not going to happen unless a really good reason comes up. That is
> one of those approaches that makes web servers run so slow.
>
> I don't think that you will have to add more of three of four rules to
> configure the whole Wordpress thing, so assuming a performance penalty for
> saving a couple of rules does not really make sense to me.
>
> Think of it in this way: You spend 15 secs adding the rule, and your server
> will run faster during the next N years. It does sound like a good time
> inversion, doesn't it?

I had not thought in this way... You are right. :)


--
Saludos:
Antonio P閞ez

ATENCI覰: Antes de imprimir este mensaje valora si verdaderamente es necesario.
De esta forma contribuimos a la preservaci髇 del Medio Ambiente.
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


alvaro at gnu

Sep 6, 2008, 2:45 AM

Post #10 of 20 (3107 views)
Permalink
Re: Wordpress and url rewrite [In reply to]

Miguel 脕ngel wrote:

> 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.

Yes, that is exactly the way it is supposed to be configured.

If you add a couple of additional rules (for the -f, -d cases) you will
point the server something that otherwise it would have to recheck
millions of times on execution.

Adding those rules, you are spending a little time for getting an
interesting performance improvement.

--
Greetings, alo
http://www.alobbs.com/
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


urko.masse at gmail

Aug 26, 2009, 6:22 PM

Post #11 of 20 (2237 views)
Permalink
Re: Wordpress and url rewrite [In reply to]

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燼m, Miguel 羘gel <miguelan...@ajo.es> wrote:
> Hi :)
> 爐he 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.
>
> 營 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 羘gel
>
> El 05/09/2008, a las 20:22, "Antonio P閞ez" <aplis...@skarcha.com>
> escribi:
>
>
>
> > On Fri, Sep 5, 2008 at 8:15 PM, Alvaro Lopez Ortega
> > <alv...@alobbs.com> 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 爌hp "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閞ez
>
> > ATENCI覰: Antes de imprimir este mensaje valora si verdaderamente es
> > 爊ecesario.
> > De esta forma contribuimos a la preservaci髇 del Medio Ambiente.
>
> _______________________________________________
> Cherokee mailing list
> Chero...@lists.octality.comhttp://lists.octality.com/listinfo/cherokee
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


mail at mattaustin

Aug 26, 2009, 7:52 PM

Post #12 of 20 (2236 views)
Permalink
Re: Wordpress and url rewrite [In reply to]

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 <urko.masse [at] gmail>
>
> 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 <miguelan...@ajo.es> 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" <aplis...@skarcha.com>
> > escribi贸:
> >
> >
> >
> > > On Fri, Sep 5, 2008 at 8:15 PM, Alvaro Lopez Ortega
> > > <alv...@alobbs.com> 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
> > Chero...@lists.octality.comhttp://lists.octality.com/listinfo/cherokee
> _______________________________________________
> Cherokee mailing list
> Cherokee [at] lists
> http://lists.octality.com/listinfo/cherokee
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


urko.masse at gmail

Aug 26, 2009, 8:38 PM

Post #13 of 20 (2236 views)
Permalink
Re: Wordpress and url rewrite [In reply to]

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 <mail [at] mattaustin>

> 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 <urko.masse [at] gmail>
> >
> > 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 <miguelan...@ajo.es> 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" <aplis...@skarcha.com>
> > > escribi贸:
> > >
> > >
> > >
> > > > On Fri, Sep 5, 2008 at 8:15 PM, Alvaro Lopez Ortega
> > > > <alv...@alobbs.com> 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
> > > Chero...@lists.octality.comhttp://lists.octality.com/listinfo/cherokee
> > _______________________________________________
> > Cherokee mailing list
> > Cherokee [at] lists
> > http://lists.octality.com/listinfo/cherokee
>


mail at mattaustin

Aug 26, 2009, 11:06 PM

Post #14 of 20 (2235 views)
Permalink
Re: Wordpress and url rewrite [In reply to]

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<urko.masse [at] gmail> 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 <mail [at] mattaustin>
>>
>> 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 <urko.masse [at] gmail>
>> >
>> > 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 <miguelan...@ajo.es> 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" <aplis...@skarcha.com>
>> > > escribi贸:
>> > >
>> > >
>> > >
>> > > > On Fri, Sep 5, 2008 at 8:15 PM, Alvaro Lopez Ortega
>> > > > <alv...@alobbs.com> 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
>> > > Chero...@lists.octality.comhttp://lists.octality.com/listinfo/cherokee
>> > _______________________________________________
>> > Cherokee mailing list
>> > Cherokee [at] lists
>> > http://lists.octality.com/listinfo/cherokee
>
>
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


urko.masse at gmail

Aug 26, 2009, 11:10 PM

Post #15 of 20 (2241 views)
Permalink
Re: Wordpress and url rewrite [In reply to]

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 <mail [at] mattaustin> 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<urko.masse [at] gmail> 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 <mail [at] mattaustin>
> >>
> >> 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 <urko.masse [at] gmail>
> >> >
> >> > 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 <miguelan...@ajo.es> 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" <aplis...@skarcha.com>
> >> > > escribi贸:
> >> > >
> >> > >
> >> > >
> >> > > > On Fri, Sep 5, 2008 at 8:15 PM, Alvaro Lopez Ortega
> >> > > > <alv...@alobbs.com> 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
> >> > > Chero...@lists.octality.comhttp://
> lists.octality.com/listinfo/cherokee
> >> > _______________________________________________
> >> > Cherokee mailing list
> >> > Cherokee [at] lists
> >> > http://lists.octality.com/listinfo/cherokee
> >
> >
>


urko.masse at gmail

Aug 28, 2009, 3:19 AM

Post #16 of 20 (2230 views)
Permalink
Re: Wordpress and url rewrite [In reply to]

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 <urko.masse [at] gmail> 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 <mail [at] mattaustin> 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<urko.masse [at] gmail> 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 <mail [at] mattaustin>
>> >>
>> >> 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 <urko.masse [at] gmail>
>> >> >
>> >> > 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 <miguelan...@ajo.es> 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" <aplis...@skarcha.com>
>> >> > > escribi贸:
>> >> > >
>> >> > >
>> >> > >
>> >> > > > On Fri, Sep 5, 2008 at 8:15 PM, Alvaro Lopez Ortega
>> >> > > > <alv...@alobbs.com> 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
>> >> > > Chero...@lists.octality.comhttp://
>> lists.octality.com/listinfo/cherokee
>> >> > _______________________________________________
>> >> > Cherokee mailing list
>> >> > Cherokee [at] lists
>> >> > http://lists.octality.com/listinfo/cherokee
>> >
>> >
>>
>
>


urko.masse at gmail

Aug 30, 2009, 11:43 PM

Post #17 of 20 (2228 views)
Permalink
Re: Wordpress and url rewrite [In reply to]

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 <urko.masse [at] gmail> 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 <urko.masse [at] gmail> 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 <mail [at] mattaustin> 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<urko.masse [at] gmail>
>>> 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 <mail [at] mattaustin>
>>> >>
>>> >> 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 <urko.masse [at] gmail>
>>> >> >
>>> >> > 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 <miguelan...@ajo.es> 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" <aplis...@skarcha.com
>>> >
>>> >> > > escribi贸:
>>> >> > >
>>> >> > >
>>> >> > >
>>> >> > > > On Fri, Sep 5, 2008 at 8:15 PM, Alvaro Lopez Ortega
>>> >> > > > <alv...@alobbs.com> 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
>>> >> > > Chero...@lists.octality.comhttp://
>>> lists.octality.com/listinfo/cherokee
>>> >> > _______________________________________________
>>> >> > Cherokee mailing list
>>> >> > Cherokee [at] lists
>>> >> > http://lists.octality.com/listinfo/cherokee
>>> >
>>> >
>>>
>>
>>
>


urko.masse at gmail

Aug 31, 2009, 3:03 AM

Post #18 of 20 (2226 views)
Permalink
Re: Wordpress and url rewrite [In reply to]

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 <urko.masse [at] gmail> 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 <urko.masse [at] gmail> 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 <urko.masse [at] gmail> 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 <mail [at] mattaustin>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<urko.masse [at] gmail>
>>>> 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 <mail [at] mattaustin>
>>>> >>
>>>> >> 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 <urko.masse [at] gmail>
>>>> >> >
>>>> >> > 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 <miguelan...@ajo.es> 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" <
>>>> aplis...@skarcha.com>
>>>> >> > > escribi贸:
>>>> >> > >
>>>> >> > >
>>>> >> > >
>>>> >> > > > On Fri, Sep 5, 2008 at 8:15 PM, Alvaro Lopez Ortega
>>>> >> > > > <alv...@alobbs.com> 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
>>>> >> > > Chero...@lists.octality.comhttp://
>>>> lists.octality.com/listinfo/cherokee
>>>> >> > _______________________________________________
>>>> >> > Cherokee mailing list
>>>> >> > Cherokee [at] lists
>>>> >> > http://lists.octality.com/listinfo/cherokee
>>>> >
>>>> >
>>>>
>>>
>>>
>>
>


urko.masse at gmail

Aug 31, 2009, 3:19 AM

Post #19 of 20 (2226 views)
Permalink
Re: Wordpress and url rewrite [In reply to]

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 <urko.masse [at] gmail> 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 <urko.masse [at] gmail> 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 <urko.masse [at] gmail> 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 <urko.masse [at] gmail> 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 <mail [at] mattaustin>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<urko.masse [at] gmail>
>>>>> 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 <mail [at] mattaustin>
>>>>> >>
>>>>> >> 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 <urko.masse [at] gmail>
>>>>> >> >
>>>>> >> > 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 <miguelan...@ajo.es> 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" <
>>>>> aplis...@skarcha.com>
>>>>> >> > > escribi贸:
>>>>> >> > >
>>>>> >> > >
>>>>> >> > >
>>>>> >> > > > On Fri, Sep 5, 2008 at 8:15 PM, Alvaro Lopez Ortega
>>>>> >> > > > <alv...@alobbs.com> 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
>>>>> >> > > Chero...@lists.octality.comhttp://
>>>>> lists.octality.com/listinfo/cherokee
>>>>> >> > _______________________________________________
>>>>> >> > Cherokee mailing list
>>>>> >> > Cherokee [at] lists
>>>>> >> > http://lists.octality.com/listinfo/cherokee
>>>>> >
>>>>> >
>>>>>
>>>>
>>>>
>>>
>>
>


mail at mattaustin

Aug 31, 2009, 4:22 AM

Post #20 of 20 (2227 views)
Permalink
Re: Wordpress and url rewrite [In reply to]

Hi Urko,

I'm glad you got it sorted. I don't think I ever got as far as
uploading images when I installed it as a quick test!

Let me know if there is anything else I can help with though.

Cheers,

Matt.

On Mon, Aug 31, 2009 at 6:19 PM, Urko Masse<urko.masse [at] gmail> wrote:
> 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 <urko.masse [at] gmail> 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 <urko.masse [at] gmail> 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 聽- "Sports is like a war without the killing."
>>>
>>> On Fri, Aug 28, 2009 at 17:19, Urko Masse <urko.masse [at] gmail> 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 <urko.masse [at] gmail> wrote:
>>>>>
>>>>> Thanks a LOT!!! :) I'll give it a try and report back.
>>>>> --
>>>>> Urko Masse
>>>>> +84-90-9088876
>>>>>
>>>>> Stephen Leacock 聽- "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 <mail [at] mattaustin>
>>>>> 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<urko.masse [at] gmail>
>>>>>> 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 <mail [at] mattaustin>
>>>>>> >>
>>>>>> >> 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 <urko.masse [at] gmail>
>>>>>> >> >
>>>>>> >> > 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 <miguelan...@ajo.es> 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"
>>>>>> >> > > <aplis...@skarcha.com>
>>>>>> >> > > escribi贸:
>>>>>> >> > >
>>>>>> >> > >
>>>>>> >> > >
>>>>>> >> > > > On Fri, Sep 5, 2008 at 8:15 PM, Alvaro Lopez Ortega
>>>>>> >> > > > <alv...@alobbs.com> 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
>>>>>> >> > >
>>>>>> >> > > Chero...@lists.octality.comhttp://lists.octality.com/listinfo/cherokee
>>>>>> >> > _______________________________________________
>>>>>> >> > Cherokee mailing list
>>>>>> >> > Cherokee [at] lists
>>>>>> >> > http://lists.octality.com/listinfo/cherokee
>>>>>> >
>>>>>> >
>>>>>
>>>>
>>>
>>
>
>
> _______________________________________________
> Cherokee mailing list
> Cherokee [at] lists
> http://lists.octality.com/listinfo/cherokee
>
>
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee

Cherokee users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.