# invoke rewrite engine
RewriteEngine On
RewriteBase /scraping/files/demo/vfsupplementsherveybay.com.au_imfhgt251299_gmail.com_ndhipvvdhe/

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

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

# Specific redirections
RewriteRule ^index\.html$ /scraping/files/demo/vfsupplementsherveybay.com.au_imfhgt251299_gmail.com_ndhipvvdhe/ [L,R=301]
RewriteCond %{QUERY_STRING} ^locale=en®ion_country=AU$
RewriteRule ^customer_authentication/redirect$ /scraping/files/demo/vfsupplementsherveybay.com.au_imfhgt251299_gmail.com_ndhipvvdhe/customer_authentication/redirect_locale-en®ion_country-AU [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=2$
RewriteRule ^collections/pre-workout$ /scraping/files/demo/vfsupplementsherveybay.com.au_imfhgt251299_gmail.com_ndhipvvdhe/collections/pre-workout_page-2 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=3$
RewriteRule ^collections/pre-workout$ /scraping/files/demo/vfsupplementsherveybay.com.au_imfhgt251299_gmail.com_ndhipvvdhe/collections/pre-workout_page-3 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=2$
RewriteRule ^collections/protein$ /scraping/files/demo/vfsupplementsherveybay.com.au_imfhgt251299_gmail.com_ndhipvvdhe/collections/protein_page-2 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=3$
RewriteRule ^collections/protein$ /scraping/files/demo/vfsupplementsherveybay.com.au_imfhgt251299_gmail.com_ndhipvvdhe/collections/protein_page-3 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=2$
RewriteRule ^collections/fat-burner$ /scraping/files/demo/vfsupplementsherveybay.com.au_imfhgt251299_gmail.com_ndhipvvdhe/collections/fat-burner_page-2 [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
