# invoke rewrite engine
RewriteEngine On
RewriteBase /scraping/files/live/markernine.com_lunnes.id_gmail.com_preqsg2ly4/

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

# Redirect 400,401,403,404,500 to main website
ErrorDocument 400 https://markernine.com
ErrorDocument 401 https://markernine.com
ErrorDocument 403 https://markernine.com
ErrorDocument 404 https://markernine.com
ErrorDocument 500 https://markernine.com

# Specific redirections
RewriteRule ^index\.html$ /scraping/files/live/markernine.com_lunnes.id_gmail.com_preqsg2ly4/ [L,R=301]
RewriteCond %{QUERY_STRING} ^page=2$
RewriteRule ^collections/accessories$ /scraping/files/live/markernine.com_lunnes.id_gmail.com_preqsg2ly4/collections/accessories_page-2 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=2$
RewriteRule ^blogs/news$ /scraping/files/live/markernine.com_lunnes.id_gmail.com_preqsg2ly4/blogs/news_page-2 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=3$
RewriteRule ^blogs/news$ /scraping/files/live/markernine.com_lunnes.id_gmail.com_preqsg2ly4/blogs/news_page-3 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=7$
RewriteRule ^blogs/news$ /scraping/files/live/markernine.com_lunnes.id_gmail.com_preqsg2ly4/blogs/news_page-7 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=2$
RewriteRule ^collections/all$ /scraping/files/live/markernine.com_lunnes.id_gmail.com_preqsg2ly4/collections/all_page-2 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=3$
RewriteRule ^collections/all$ /scraping/files/live/markernine.com_lunnes.id_gmail.com_preqsg2ly4/collections/all_page-3 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=1$
RewriteRule ^blogs/news$ /scraping/files/live/markernine.com_lunnes.id_gmail.com_preqsg2ly4/blogs/news_page-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=4$
RewriteRule ^blogs/news$ /scraping/files/live/markernine.com_lunnes.id_gmail.com_preqsg2ly4/blogs/news_page-4 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=5$
RewriteRule ^blogs/news$ /scraping/files/live/markernine.com_lunnes.id_gmail.com_preqsg2ly4/blogs/news_page-5 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=6$
RewriteRule ^blogs/news$ /scraping/files/live/markernine.com_lunnes.id_gmail.com_preqsg2ly4/blogs/news_page-6 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=1$
RewriteRule ^collections/all$ /scraping/files/live/markernine.com_lunnes.id_gmail.com_preqsg2ly4/collections/all_page-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=4$
RewriteRule ^collections/all$ /scraping/files/live/markernine.com_lunnes.id_gmail.com_preqsg2ly4/collections/all_page-4 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=1$
RewriteRule ^collections/short-sleeve$ /scraping/files/live/markernine.com_lunnes.id_gmail.com_preqsg2ly4/collections/short-sleeve_page-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=2$
RewriteRule ^collections/short-sleeve$ /scraping/files/live/markernine.com_lunnes.id_gmail.com_preqsg2ly4/collections/short-sleeve_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
