# invoke rewrite engine
RewriteEngine On
RewriteBase /

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$ / [L,R=301]
RewriteCond %{QUERY_STRING} ^current=blog$
RewriteRule ^user/login$ user/login_current-blog [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=1$
RewriteRule ^blog$ blog_page-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=2$
RewriteRule ^blog$ blog_page-2 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=3$
RewriteRule ^blog$ blog_page-3 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=4$
RewriteRule ^blog$ blog_page-4 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=5$
RewriteRule ^blog$ blog_page-5 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=6$
RewriteRule ^blog$ blog_page-6 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=7$
RewriteRule ^blog$ blog_page-7 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^page=8$
RewriteRule ^blog$ blog_page-8 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^url=http\://www\.prosveta-canada\.com/francais_accueil\.html$
RewriteRule ^redirection\.php$ redirection_url-http-www_prosveta-canada_com_francais_accueil_html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^url=http\://www\.prosveta\.ch$
RewriteRule ^redirection\.php$ redirection_url-http-www_prosveta_ch [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^url=http\://www\.prosveta\.be$
RewriteRule ^redirection\.php$ redirection_url-http-www_prosveta_be [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^url=http\://www\.prosveta\.fr$
RewriteRule ^redirection\.php$ redirection_url-http-www_prosveta_fr [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^current=node/1$
RewriteRule ^user/login$ user/login_current-node_1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^current=node/14$
RewriteRule ^user/login$ user/login_current-node_14 [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

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php82” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php82 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
