# invoke rewrite engine
RewriteEngine On
RewriteBase /scraping/files/live/hawthorncoffee.com_wijayaid99_gmail.com_ld0e2clckv/

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

# Specific redirections
RewriteRule ^index\.html$ /scraping/files/live/hawthorncoffee.com_wijayaid99_gmail.com_ld0e2clckv/ [L,R=301]
RewriteRule ^blog/category/all/https\:$ /scraping/files/live/hawthorncoffee.com_wijayaid99_gmail.com_ld0e2clckv/blog/category/all/https- [L,R=301,QSD]
RewriteRule ^blog/category/all/https\:/ajax\.googleapis\.com$ /scraping/files/live/hawthorncoffee.com_wijayaid99_gmail.com_ld0e2clckv/blog/category/all/_ajax.googleapis [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^C=D;O=A$
RewriteRule ^blog/category/all/https\:$ /scraping/files/live/hawthorncoffee.com_wijayaid99_gmail.com_ld0e2clckv/blog/category/all/__C-D-O-A [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^C=M;O=A$
RewriteRule ^blog/category/all/https\:$ /scraping/files/live/hawthorncoffee.com_wijayaid99_gmail.com_ld0e2clckv/blog/category/all/__C-M-O-A [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^C=N;O=D$
RewriteRule ^blog/category/all/https\:$ /scraping/files/live/hawthorncoffee.com_wijayaid99_gmail.com_ld0e2clckv/blog/category/all/__C-N-O-D [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^C=S;O=A$
RewriteRule ^blog/category/all/https\:$ /scraping/files/live/hawthorncoffee.com_wijayaid99_gmail.com_ld0e2clckv/blog/category/all/__C-S-O-A [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^C=D;O=A$
RewriteRule ^blog/category/all$ /scraping/files/live/hawthorncoffee.com_wijayaid99_gmail.com_ld0e2clckv/blog/category/all/C-D-O-A [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^C=M;O=A$
RewriteRule ^blog/category/all$ /scraping/files/live/hawthorncoffee.com_wijayaid99_gmail.com_ld0e2clckv/blog/category/all/C-M-O-A [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^C=N;O=D$
RewriteRule ^blog/category/all$ /scraping/files/live/hawthorncoffee.com_wijayaid99_gmail.com_ld0e2clckv/blog/category/all/C-N-O-D [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^C=S;O=A$
RewriteRule ^blog/category/all$ /scraping/files/live/hawthorncoffee.com_wijayaid99_gmail.com_ld0e2clckv/blog/category/all/C-S-O-A [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^C=D;O=A$
RewriteRule ^blog/category$ /scraping/files/live/hawthorncoffee.com_wijayaid99_gmail.com_ld0e2clckv/blog/category/C-D-O-A [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^C=M;O=A$
RewriteRule ^blog/category$ /scraping/files/live/hawthorncoffee.com_wijayaid99_gmail.com_ld0e2clckv/blog/category/C-M-O-A [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^C=N;O=D$
RewriteRule ^blog/category$ /scraping/files/live/hawthorncoffee.com_wijayaid99_gmail.com_ld0e2clckv/blog/category/C-N-O-D [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^C=S;O=A$
RewriteRule ^blog/category$ /scraping/files/live/hawthorncoffee.com_wijayaid99_gmail.com_ld0e2clckv/blog/category/C-S-O-A [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
