<IfModule mod_rewrite.c>
	
  
DirectoryIndex my_index.php



# Use 'my_file.php' instead of 'file.php'
# This will:
# 1. allow for easy identification of where a file belongs.
# 2. prevents the website from crashing if a 'index.php' file is uploaded to the wrong directory


RewriteEngine On


#redirect if 'secure' isn't the subdomain
RewriteCond %{HTTP_HOST} ^(www\.)?localthanks\.com$ [NC]
RewriteRule ^ http://secure\.localthanks.com/mystore  [L,QSA]

RewriteCond %{HTTP_HOST} ^(www\.)?localthanks\.net$ [NC]
RewriteRule ^ http://secure\.localthanks.net/mystore  [L,QSA]

RewriteCond %{HTTP_HOST} ^(www\.)?localthanks\.org$ [NC]
RewriteRule ^ http://secure\.localthanks.org/mystore  [L,QSA]

RewriteCond %{HTTP_HOST} ^(www\.)?localthanks\.biz$ [NC]
RewriteRule ^ http://secure\.localthanks.biz/mystore  [L,QSA]

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

RewriteCond %{HTTP_HOST} ^secure\.localthanks\.(net|org|com|biz)  [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.php$ my_$1\.php  [L,QSA]


</IfModule>
