RewriteEngine on

#RewriteCond %{HTTPS} off
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

#RewriteCond %{HTTP_HOST} !^www\. [NC]
#RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteRule ^(links|discussions|stats|content|dashboard|register|login|learn|rules|legal)$ $1.php [NC,L]
RewriteRule ^(buy)/(points)$ buy.php?section=$2 [NC,L]
RewriteRule ^(buy)/(confirm)/([\d]+)$ buy.php?section=$2&id=$3 [NC,L]
RewriteRule ^add/points/(list|link)/([\d]+)$ add.php?section=$1&id=$2 [NC,L]
RewriteRule ^(create|edit|delete)/([-\w]+)$ $1.php?section=$2 [NC,L]
RewriteRule ^(create|edit|delete)/([-\w]+)/([\d]+)$ $1.php?section=$2&id=$3 [NC,L]
RewriteRule ^(user|list|link|discussion)/([\d]+)$ $1.php?id=$2 [NC,L]