Posts

Showing posts from 2007

Undeleting posts on vBulletin

UPDATE post SET visible = 1 WHERE visible = 2 AND userid = XXX;

Replace XXX with UserID.

Getting vsftpd to work with iptables

Typing modprobe ip_conntrack_ftp in to shell as root seems to make it work. Obviously do your own research and if you try this, then it's at your own risk. This, like most things, is really just a note to myself!

Rewrite: Captialize first letter

A useful mod_rewrite routine which capitalizes the first letter of the request and does some other clever stuff, thanks to Peter on http://forum.modrewrite.com for the advice.

RewriteEngine On
RewriteMap uppercase int:toupper
RewriteMap lowercase int:tolower
RewriteRule ^misc\.php$ - [L]
RewriteCond %{REQUEST_URI} !^.*/[A-Z][^A-Z]+\.php$
RewriteRule ^/misc/(.)(.+)\.php$ /misc.php?do=page&template=${uppercase:$1}${lowercase:$2} [NC,R=301,L]