# invoke rewrite engine
RewriteEngine On
RewriteBase /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/

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

# Add a trailing slash (/) to a URL
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !\.[A-Za-z0-9]*$
RewriteRule .*[^/]$ %{REQUEST_URI}/ [L,R=301]

# Specific redirections
RewriteRule ^index\.html$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/ [L,R=301]
RewriteCond %{QUERY_STRING} ^valid=false$
RewriteRule ^ds_login\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/ds_login_valid-false/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^pid=1$
RewriteRule ^p_parts\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/p_parts_pid-1/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^pid=2$
RewriteRule ^p_parts\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/p_parts_pid-2/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^pid=3$
RewriteRule ^p_parts\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/p_parts_pid-3/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^cid=1$
RewriteRule ^p_products\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/p_products_cid-1/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^cid=2$
RewriteRule ^p_products\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/p_products_cid-2/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^cid=3$
RewriteRule ^p_products\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/p_products_cid-3/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^cid=4$
RewriteRule ^p_products\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/p_products_cid-4/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^pid=1$
RewriteRule ^p_productsdetails\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/p_productsdetails_pid-1/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^pid=2$
RewriteRule ^p_productsdetails\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/p_productsdetails_pid-2/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^pid=3$
RewriteRule ^p_productsdetails\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/p_productsdetails_pid-3/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^pid=5$
RewriteRule ^p_productsdetails\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/p_productsdetails_pid-5/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^pid=6$
RewriteRule ^p_productsdetails\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/p_productsdetails_pid-6/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^pid=7$
RewriteRule ^p_productsdetails\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/p_productsdetails_pid-7/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^pid=8$
RewriteRule ^p_productsdetails\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/p_productsdetails_pid-8/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^pid=9$
RewriteRule ^p_productsdetails\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/p_productsdetails_pid-9/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^sid=1$
RewriteRule ^p_service\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/p_service_sid-1/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^sid=3$
RewriteRule ^p_service\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/p_service_sid-3/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^i=DSCF0018\.JPG&w=175$
RewriteRule ^thumbimg\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/thumbimg_i-DSCF0018_JPG-w-175/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^i=DSCF0018\.JPG&w=80$
RewriteRule ^thumbimg\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/thumbimg_i-DSCF0018_JPG-w-80/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^i=flow3\.JPG&w=100$
RewriteRule ^thumbimg\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/thumbimg_i-flow3_JPG-w-100/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^i=kira\.GIF&w=100$
RewriteRule ^thumbimg\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/thumbimg_i-kira_GIF-w-100/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^i=kira\.GIF&w=54$
RewriteRule ^thumbimg\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/thumbimg_i-kira_GIF-w-54/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^i=marvel\.GIF&w=100$
RewriteRule ^thumbimg\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/thumbimg_i-marvel_GIF-w-100/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^i=mazak\+logo\(2\)\.jpg&w=100$
RewriteRule ^thumbimg\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/thumbimg_i-mazak-logo(2)_jpg-w-100/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^i=mycrona\.jpg&w=100$
RewriteRule ^thumbimg\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/thumbimg_i-mycrona_jpg-w-100/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^i=Nexus\+200\.JPG&w=175$
RewriteRule ^thumbimg\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/thumbimg_i-Nexus-200_JPG-w-175/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^i=star3\.GIF&w=100$
RewriteRule ^thumbimg\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/thumbimg_i-star3_GIF-w-100/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^i=Sunset\.jpg&w=125$
RewriteRule ^thumbimg\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/thumbimg_i-Sunset_jpg-w-125/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^i=Sunset\.jpg&w=225$
RewriteRule ^thumbimg\.asp$ /scraping/files/live/smithmachinetools.com_jels.leoslot88_gmail.com_vjvtfgx9n6/thumbimg_i-Sunset_jpg-w-225/ [L,R=301,QSD]

# Create pretty URLs
RewriteRule ^([^/]+)/$ $1.html [S=9]
RewriteRule ^([^/]+)/([^/]+)/$ $1/$2.html [S=8]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/$ $1/$2/$3.html [S=7]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ $1/$2/$3/$4.html [S=6]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ $1/$2/$3/$4/$5.html [S=5]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ $1/$2/$3/$4/$5/$6.html [S=4]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ $1/$2/$3/$4/$5/$6/$7.html [S=3]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ $1/$2/$3/$4/$5/$6/$7/$8.html [S=2]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ $1/$2/$3/$4/$5/$6/$7/$8/$9.html [S=1]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ $1/$2/$3/$4/$5/$6/$7/$8/$9/$10.html
# 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
