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

    RewriteEngine On

    # Rewrite from non www to www
    RewriteCond %{HTTP_HOST} !^www|staging\.
    RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

    # Redirects
    RewriteRule ^en/market-intelligence$ /press-statistics [R=301,L]
    RewriteRule ^en/news-and-press$ / [R=301,L]
    RewriteRule ^en/contact-$ /contact [R=301,L]
    RewriteRule ^en/about/about-us$ /about [R=301,L]
    RewriteRule ^en/buy--with-confidence/about-buy-with-confidence$ /buy-with-confidence [R=301,L]
    RewriteRule ^en/buy--with-confidence/the-code-of-practice-$ /downloads/download/435 [R=301,L]
    RewriteRule ^en/membership/standards-and-guidelines$ /downloads/download/184 [R=301,L]
    RewriteRule ^data-sharing-policy$ /downloads/download/880 [R=301,L]
    RewriteRule ^articles$ /downloads/download/375 [R=301,L]
    RewriteRule ^appendix1$ /downloads/33 [R=301,L]
    RewriteRule ^en.*/(.*)$ /$1 [R=301,L]

    # Force redirect to SSL
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # Send Requests To Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

# 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 .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
