Forum

UrlToolkit for Wordpress SuperCache

Michael Klein
18 August 2009, 13:14
Hello,

I recently stumbled over a rewrite for wordpress' plugin called "SuperCache" which stores cached files in the docroot.
So far so good... But how can I differentiate between a Formpost and/or Cookie contents like this:

<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
</IfModule>


OK, line 2, 4 and 5 are simple, but what should I do with the REQUEST_METHOD?

asking,

Michael


Hiawatha version: 6.16
Operating System: Debian Lenny
Hugo Leisink
18 August 2009, 13:53
This is also why I don't like Apache. Apache allows you to place some of the applications business logic outside the application. URL rewriting's only purpose should be to redirect user friendly and nice readable URLs to URLs that the application can handle. Nothing more, nothing less. It's up to the application to handle things like request methods and cookies in the right way. In my opinion, it's not something a webserver should do on behalf of the application. Having part of the business logic of the application somewhere else then inside the application causes problems during backup or migration of the application. You're also stuck to a webserver that supports that kind of thing. You're experiencing it right now: SuperCache forces you to use Aapche!

All that Hiawatha can do is rewrite the URL based on the content of the URL. I know this gives problem with some applications, but I hate ugly designs. And to me, it looks like the SuperCache plugin has been designed in an ugly way. So, Hiawatha will not be able to support it. Sorry.
Michael Klein
18 August 2009, 15:16
no Problem.

normally, everything regarding modifying data (eg. forums, comments, sitecontentupdate) points to a dynamic script.
I also don't get the point in analyzing formpost-stuff and so on. I think, I should try the plugin only with pure rewriting without deeper analysis.

Thanx, Michael
Michael Klein
18 August 2009, 20:02
OK, there's a better solution:
setup SuperCache with the "half On" option and everything works without .htaccess...
This topic has been closed.