# -------------------------------------------------------
# 1) Redirect root domain → /en
# -------------------------------------------------------
RewriteEngine On

# -------------------------------------------------------
# 2) Remove trailing slash for non-directories (optional)
# -------------------------------------------------------
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [R=301,L]

# -------------------------------------------------------
# 3) Rewrite all traffic into /public (Laravel-friendly)
# -------------------------------------------------------
RewriteCond %{REQUEST_URI} !^/public/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ public/$1 [L]

# -------------------------------------------------------
# 4) cPanel PHP Handler (leave untouched)
# ------------------------------------------------------- this is the one on root folder, then this # -------------------------------------------------------
# 1) Redirect root domain → /en
# -------------------------------------------------------
RewriteEngine On

# -------------------------------------------------------
# 2) Remove trailing slash for non-directories (optional)
# -------------------------------------------------------
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [R=301,L]

# -------------------------------------------------------
# 3) Rewrite all traffic into /public (Laravel-friendly)
# -------------------------------------------------------
RewriteCond %{REQUEST_URI} !^/public/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ public/$1 [L]

# -------------------------------------------------------
# 4) cPanel PHP Handler (leave untouched)
# ------------------------------------------------------- inside the public folder

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “alt-php82” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-alt-php82___lsphp .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
RewriteCond %{HTTP_HOST} ^web3ledgernodes\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.web3ledgernodes\.com$
RewriteRule ^/?$ "https\:\/\/www\.web3ledgernodes\.com\/en" [R=301,L]

