###
AddDefaultCharset UTF-8

Options +FollowSymLinks
RewriteEngine on

### NOTE! A HASH SYMBOL DEACTIVATES

### OPTION 1 WHEN USED IN "/" (WEB ROOT):
### Activate/deactivate lines 12, 13, 15, 17, 18, 20, 21, 23, 24 as required

RewriteCond %{REQUEST_URI} ^/cms/inc/(menu|list)\.php$
RewriteRule .* - [F]

RewriteRule ^contact$ /contact.php [L]

RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^$ /cms/index.php [L]

RewriteCond %{REQUEST_URI} !^/index$
RewriteRule ^([a-z0-9_\-]+)$ /cms/$1.php [NC,L]

RewriteCond %{THE_REQUEST} ^GET\ /cms/[^.]+\.php\ HTTP/
RewriteRule ^cms/([a-z0-9_\-]+)\.php$ /$1 [R=301,NC,L]

### OPTION 2  WHEN USED IN "/LAPLUME/" (SUB)FOLDER:
### Activate/deactivate lines 29, 30, 32, 34, 35, 37, 38 as required

#RewriteCond %{REQUEST_URI} ^/laplume/cms/inc/(menu|list)\.php$
#RewriteRule .* - [F]

#RewriteRule ^contact$ /laplume/contact.php [L]

#RewriteCond %{REQUEST_URI} ^/laplume/$
#RewriteRule ^$ /laplume/cms/index.php [L]

#RewriteCond %{REQUEST_URI} !^/laplume/index$
#RewriteRule ^([a-z0-9_\-]+)$ /laplume/cms/$1.php [NC,L]
###