# invoke rewrite engine
RewriteEngine On
RewriteBase /

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

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

# 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$ / [L,R=301]
RewriteCond %{QUERY_STRING} ^s=\%E9\%82\%B5\%E6\%B0\%8F\%E5\%87\%8C\%E6\%B3\%A2\%E9\%BB\%84\%E6\%A2\%85\%E6\%88\%8F\%E9\%87\%91\%E7\%9F\%B3\%E6\%83\%85-\%E3\%80\%90\%E2\%9C\%94\%EF\%B8\%8F\%E6\%8E\%A8\%E8\%8D\%90BB76\%C2\%B7CC\%E2\%9C\%94\%EF\%B8\%8F\%E3\%80\%91-\%E9\%94\%A1\%E5\%AD\%97\%E7\%B2\%A4\%E8\%AF\%AD\%E5\%8F\%91\%E9\%9F\%B3-\%E9\%82\%B5\%E6\%B0\%8F\%E5\%87\%8C\%E6\%B3\%A2\%E9\%BB\%84\%E6\%A2\%85\%E6\%88\%8F\%E9\%87\%91\%E7\%9F\%B3\%E6\%83\%852d7v4-\%E3\%80\%90\%E2\%9C\%94\%EF\%B8\%8F\%E6\%8E\%A8\%E8\%8D\%90BB76\%C2\%B7CC\%E2\%9C\%94\%EF\%B8\%8F\%E3\%80\%91-\%E9\%94\%A1\%E5\%AD\%97\%E7\%B2\%A4\%E8\%AF\%AD\%E5\%8F\%91\%E9\%9F\%B39wbq-\%E9\%82\%B5\%E6\%B0\%8F\%E5\%87\%8C\%E6\%B3\%A2\%E9\%BB\%84\%E6\%A2\%85\%E6\%88\%8F\%E9\%87\%91\%E7\%9F\%B3\%E6\%83\%85yj5ti-\%E9\%94\%A1\%E5\%AD\%97\%E7\%B2\%A4\%E8\%AF\%AD\%E5\%8F\%91\%E9\%9F\%B32tlp$
RewriteRule ^/?$ files/戏金石情yj5ti-锡字粤语发音2tlp_0koh2z2ktge5dghtzpmnko/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^s=\%E9\%BB\%91\%E6\%9D\%BE\%E7\%94\%9F\%E9\%95\%B7\%E9\%80\%9F\%E5\%BA\%A6-\%E3\%80\%90\%E2\%9C\%94\%EF\%B8\%8F\%E6\%8E\%A8\%E8\%96\%A6BB87\%C2\%B7CC\%E2\%9C\%94\%EF\%B8\%8F\%E3\%80\%91-\%E5\%B0\%81\%E9\%82\%8A\%E6\%A9\%9F\%E8\%AE\%8A\%E9\%A0\%BB\%E5\%99\%A8\%E6\%95\%85\%E9\%9A\%9C\%E8\%99\%95\%E7\%90\%86-\%E9\%BB\%91\%E6\%9D\%BE\%E7\%94\%9F\%E9\%95\%B7\%E9\%80\%9F\%E5\%BA\%A63dhms-\%E3\%80\%90\%E2\%9C\%94\%EF\%B8\%8F\%E6\%8E\%A8\%E8\%96\%A6BB87\%C2\%B7CC\%E2\%9C\%94\%EF\%B8\%8F\%E3\%80\%91-\%E5\%B0\%81\%E9\%82\%8A\%E6\%A9\%9F\%E8\%AE\%8A\%E9\%A0\%BB\%E5\%99\%A8\%E6\%95\%85\%E9\%9A\%9C\%E8\%99\%95\%E7\%90\%86ur59-\%E9\%BB\%91\%E6\%9D\%BE\%E7\%94\%9F\%E9\%95\%B7\%E9\%80\%9F\%E5\%BA\%A6vdi37-\%E5\%B0\%81\%E9\%82\%8A\%E6\%A9\%9F\%E8\%AE\%8A\%E9\%A0\%BB\%E5\%99\%A8\%E6\%95\%85\%E9\%9A\%9C\%E8\%99\%95\%E7\%90\%86wi8k$
RewriteRule ^/?$ files/vdi37-封邊機變頻器故障處理wi8k_ooo3dm6crbss50swjdj86f/ [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^utm_content=getataste$
RewriteRule ^getataste/?$ getataste/utm_content-getataste/ [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
