Categories
Recent Posts
Recent Comments
Archives
Tags
Monthly Archives: November 2010
Lighttpd mod rewrite with file exists condition
You know apache conditional re-writing rules, like:
RewriteCond %{REQUEST_FILENAME} !-s
How do you do it with lighttpd? Seems that the guys did not wanted to have a take on it for some performance reasons, but its also a condition rule that many PHP framework cannot live without.
Yes you can redirect everything to PHP and then handle it there, but then essentially you everything needs to be handle by PHP – even static files and headers and and and and becomes a headache. Continue reading
Posted in SysAdmin Leave a comment
Lighttpd & Apache on the same port 80
Recently one of the domains I host got under DOS attack fire. Im talking serious traffic that the box could not handle and apache pumped up 99% CPU. Well its time for an upgrade there I thought, and turned to my hosting company to get new one.
In the meantime I tried to handle the situation and installed mod_evasive with APF firewall to put DROP rules for incoming IPs. Anyways it seemed not to make much difference in my case, so I ended up crawling site into static html and putting it on my CDN for now. Continue reading
Posted in SysAdmin Leave a comment
Permalink Converter WordPress plugin
If you struggle with broken links while making changes in your WordPress pages parents, post and categories, here’s solution for you. Brought to live because of my own experience. I had to restructure lots of permalinks on one of the sites I manage and then unfortunately do it again, because the concept changed in the mean time.
I used do query operations directly on database, but finally got fed up and started looking for existing solutions. I’ve found this one, unfortunately a big buggy. If you use this one and for example put /?p=2322 the leading forward slash will fuck up the converted link. Thats one of the problems I had. Continue reading