# invoke rewrite engine
RewriteEngine On
RewriteBase /scraping/files/live/puntagordamercantile.com_idontkae_gmail.com_dkly1uv8s0/

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

# Specific redirections
RewriteRule ^index\.html$ /scraping/files/live/puntagordamercantile.com_idontkae_gmail.com_dkly1uv8s0/ [L,R=301]
RewriteCond %{QUERY_STRING} ^page=2$
RewriteRule ^collections/collectables-vintage$ /scraping/files/live/puntagordamercantile.com_idontkae_gmail.com_dkly1uv8s0/collections/collectables-vintage_page-2 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=2$
RewriteRule ^collections/home-decr$ /scraping/files/live/puntagordamercantile.com_idontkae_gmail.com_dkly1uv8s0/collections/home-decr_page-2 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=2$
RewriteRule ^collections/collectables-vintage/active$ /scraping/files/live/puntagordamercantile.com_idontkae_gmail.com_dkly1uv8s0/collections/collectables-vintage/active_page-2 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=2$
RewriteRule ^collections/collectables-vintage/collectable-vintage$ /scraping/files/live/puntagordamercantile.com_idontkae_gmail.com_dkly1uv8s0/collections/collectables-vintage/collectable-vintage_page-2 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=2$
RewriteRule ^collections/collectables-vintage/punta-gorda-mercantile$ /scraping/files/live/puntagordamercantile.com_idontkae_gmail.com_dkly1uv8s0/collections/collectables-vintage/punta-gorda-mercantile_page-2 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=1$
RewriteRule ^collections/collectables-vintage$ /scraping/files/live/puntagordamercantile.com_idontkae_gmail.com_dkly1uv8s0/collections/collectables-vintage_page-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=1$
RewriteRule ^collections/home-decr$ /scraping/files/live/puntagordamercantile.com_idontkae_gmail.com_dkly1uv8s0/collections/home-decr_page-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^return_url=\%2Faccount$
RewriteRule ^account/login$ /scraping/files/live/puntagordamercantile.com_idontkae_gmail.com_dkly1uv8s0/account/login_return_url-_account [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=3$
RewriteRule ^collections/home-decr$ /scraping/files/live/puntagordamercantile.com_idontkae_gmail.com_dkly1uv8s0/collections/home-decr_page-3 [L,R=301,QSD]

# Create pretty URLs
DirectorySlash Off

RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
RewriteRule ^ %1 [NC,L,R=301]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} (.*)/$
RewriteRule ^(.*)/$ $1 [NC,L,R=301]

RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_URI}.html [NC,L]
# End: Create pretty URLs

# 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
