
RewriteOptions inherit
PassengerAppRoot /home/aldurra/public_html
PassengerBaseURI /
PassengerNodejs /opt/cpanel/ea-nodejs20/bin/node
PassengerAppType node
PassengerStartupFile .next/standalone/server.js
PassengerFriendlyErrorPages off

# allow Apache to follow our _next/static -> .next/static symlink
Options +FollowSymLinks

# Serve static & public assets directly (don’t hit Passenger)
<IfModule mod_rewrite.c>
  RewriteEngine On

  RewriteCond %{REQUEST_URI} ^/_next/static/ [OR]
  RewriteCond %{REQUEST_URI} ^/static/ [OR]
  RewriteCond %{REQUEST_URI} ^/public/
  RewriteRule ^ - [L]

  # don’t rewrite existing files/dirs
  RewriteCond %{REQUEST_FILENAME} -f [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^ - [L]
</IfModule>

# Never invoke Passenger for pure assets
<FilesMatch "\.(?:js|jsx|ts|tsx|mjs|css|png|jpe?g|gif|svg|ico|webp|woff2?|ttf|eot|map)$">
#   PassengerEnabled off
</FilesMatch>
RewriteCond %{HTTP_HOST} ^aldurra\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.aldurra\.com$
RewriteRule ^ar$ "https\:\/\/www\.aldurra\.com\/" [R=302,L]

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