13 November 2022

Redirect all subdomains to main domain using .htaccess. Using some sort of a mass-hosting provider, you never know what they might change in your DNS automatically. This is a backup solution to make sure all subdomains get redirected to the main domain without any prefix. Personally ran into an issue where the panel software masked all .mail and .ftp traffic to the site.

Source code viewer
  1. RewriteCond %{HTTP_HOST} ^[^.]+\.(browse-tutorials\.com) [NC]
  2. RewriteRule ^ http%{ENV:protossl}://%1%{REQUEST_URI} [L,R=301]
Programming Language: Text