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 ^(categories|stats|register|login|contact|about|legal|dashboard|submit)$ $1.php [NC,L]
RewriteRule ^(category|dashboard|edit|page)/([-\w]+)$ $1.php?section=$2 [NC,L]
RewriteRule ^(category|dashboard|edit|page)/([-\w]+)/([\d]+)$ $1.php?section=$2&id=$3 [NC,L]
RewriteRule ^(add-points|edit-listing|listing)/([\d]+)$ $1.php?id=$2 [NC,L]