RewriteCond %{HTTP_HOST} ^www.example.com$
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
RewriteRule ^blog/(.*)$ article.php?slug=$1 [L]
RewriteRule ^category/([0-9]+)/(.*)$ archive.php?cat_id=$1&name=$2 [L]
RewriteMap lc int:tolower
RewriteRule ^([a-z]+)$ ${lc:$1}
RewriteCond %{REMOTE_ADDR} !=127.0.0.1
RewriteRule ^(.*)$ /maintenance.html [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?page=$1 [L]