

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

# --- URL rewrite block (added 2026-05-13) ---
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /

  # Canonical host — force non-www (added 2026-07-08, fixes www/non-www duplicate content)
  RewriteCond %{HTTP_HOST} ^www\.help4bis\.com$ [NC]
  RewriteRule ^(.*)$ https://help4bis.com/$1 [R=301,L]

  # Internal rewrites — clean URL stays in browser bar
  RewriteRule ^managed-wordpress/?$  managed-wordpress.html  [L]
  RewriteRule ^contact/?$            contact.html            [L]
  RewriteRule ^wordpress-care-plans/?$ care-plans.html       [L]

  # Pricing — 301 to homepage (temporary until pricing.html is delivered)
  RewriteRule ^pricing/?$            pricing.html  [L]

  # Long legacy slug — 301 to homepage
  RewriteRule ^responsive-eco-conscious-and-community-centric-managed-wordpress-hosting/?$  /  [R=301,L]

  # Legacy WordPress-era glossary section (removed) — 301 so Google drops it (added 2026-07-08)
  RewriteRule ^glossary/.*$  /  [R=301,L]
</IfModule>
# --- end URL rewrite block ---

# --- Consulting pages removed 2026-05-25 ---
Redirect 301 /business-analysis.html /
Redirect 301 /business-process-architecture.html /
Redirect 301 /ai-training-evaluation.html /
# --- end consulting redirects ---

# --- Stale WordPress-era URLs still in Google index (added 2026-05-25) ---
# 301 so Google replaces the old cached pages with the current static site.
Redirect 301 /about-us/ /about.html
Redirect 301 /empower-your-start-up-journey-with-our-managed-wordpress-hosting/ /
Redirect 301 /elevate-your-business/ /
Redirect 301 /terms-and-conditions/ /terms.html
Redirect 301 /privacy-policy/ /privacy.html
Redirect 301 /how-to-use-the-support-system/ /support/
Redirect 301 /unlock-australias-best-web-hosting/ /
Redirect 301 /support-local-businesses/ /
Redirect 301 /js-support-ticket-controlpanel/ /support/
Redirect 301 /the-best-webhosting-in-brisbane-why-help4bis-tops-the-list/ /
Redirect 301 /lets-get-started/ /
# --- end stale URL redirects ---

# --- Block stray backup files from the web (added 2026-07-08) ---
# Editing workflow leaves *.bak.<timestamp> copies alongside live files; never serve them.
<FilesMatch "(\.bak(\.|$)|\.orig$|\.save$|\.old$|\.backup$|-bak$|~$)">
  Require all denied
</FilesMatch>
# --- end backup file block ---
