# invoke rewrite engine
RewriteEngine On
RewriteBase /

Options -Indexes
<IfModule mod_negotiation.c>
	Options -MultiViews
</IfModule>

# Redirect to www
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

# Prevent scraping from archive for free demo
RewriteCond %{HTTP_USER_AGENT} (ia_archiver) [NC]
RewriteRule . - [F,L]

# Specific redirections
RewriteRule ^index.html$ / [L,R=301]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^index\.php$ index_php.html? [L,R=301]
RewriteCond %{QUERY_STRING} ^id\=$
RewriteRule ^view_image\.php$ view_image_id.html? [L,R=301]
RewriteCond %{QUERY_STRING} ^poll\=Results$
RewriteRule ^index\.php$ index_poll_Results.html? [L,R=301]
RewriteCond %{QUERY_STRING} ^id\=15$
RewriteRule ^store\.php$ store_id_15.html? [L,R=301]
RewriteCond %{QUERY_STRING} ^id\=13$
RewriteRule ^store\.php$ store_id_13.html? [L,R=301]
RewriteCond %{QUERY_STRING} ^id\=3$
RewriteRule ^store\.php$ store_id_3.html? [L,R=301]
RewriteCond %{QUERY_STRING} ^id\=5$
RewriteRule ^store\.php$ store_id_5.html? [L,R=301]
RewriteCond %{QUERY_STRING} ^id\=6$
RewriteRule ^store\.php$ store_id_6.html? [L,R=301]
RewriteCond %{QUERY_STRING} ^id\=7$
RewriteRule ^store\.php$ store_id_7.html? [L,R=301]
RewriteCond %{QUERY_STRING} ^id\=8$
RewriteRule ^store\.php$ store_id_8.html? [L,R=301]
RewriteCond %{QUERY_STRING} ^id\=9$
RewriteRule ^store\.php$ store_id_9.html? [L,R=301]
RewriteCond %{QUERY_STRING} ^id\=10$
RewriteRule ^store\.php$ store_id_10.html? [L,R=301]
RewriteCond %{QUERY_STRING} ^id\=11$
RewriteRule ^store\.php$ store_id_11.html? [L,R=301]
RewriteCond %{QUERY_STRING} ^id\=12$
RewriteRule ^store\.php$ store_id_12.html? [L,R=301]
RewriteCond %{QUERY_STRING} ^store\=1$
RewriteRule ^contact\.php$ contact_store_1.html? [L,R=301]
RewriteCond %{QUERY_STRING} ^id\=$
RewriteRule ^player\.php$ player_id.html? [L,R=301]

# Redirect all extensions to html
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.*)\.shtml$ $1.html [L,NC,R=301]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.*)\.phtml$ $1.html [L,NC,R=301]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.*)\.jhtml$ $1.html [L,NC,R=301]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.*)\.htm$ $1.html [L,NC,R=301]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.*)\.php$ $1.html [L,NC,R=301]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.*)\.aspx$ $1.html [L,NC,R=301]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.*)\.asp$ $1.html [L,NC,R=301]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.*)\.jsp$ $1.html [L,NC,R=301]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.*)\.apk$ $1.html [L,NC,R=301]
# End: Redirect all extensions to html
