JezK
Edit File: .htaccess.old
RewriteOptions inherit # BEGIN WordPress # The directives (lines) between "BEGIN WordPress" and "END WordPress" are # dynamically generated, and should only be modified via WordPress filters. # Any changes to the directives between these markers will be overwritten. <IfModule mod_rewrite.c> RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress # BEGIN cPanel-generated php ini directives, do not edit # Manual editing of this file may result in unexpected behavior. # To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor) # For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI) <IfModule php7_module> php_flag display_errors Off php_value max_execution_time 300 php_value max_input_time 60 php_value max_input_vars 1000 php_value memory_limit 256M php_value post_max_size 50M php_value session.gc_maxlifetime 1440 php_value session.save_path "/var/cpanel/php/sessions/ea-php71" php_value upload_max_filesize 50M php_flag zlib.output_compression Off </IfModule> <IfModule lsapi_module> php_flag display_errors Off php_value max_execution_time 300 php_value max_input_time 60 php_value max_input_vars 1000 php_value memory_limit 256M php_value post_max_size 50M php_value session.gc_maxlifetime 1440 php_value session.save_path "/var/cpanel/php/sessions/ea-php71" php_value upload_max_filesize 50M php_flag zlib.output_compression Off </IfModule> # END cPanel-generated php ini directives, do not edit #redirect http to https # RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} ^chem\-on\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.chem\-on\.com$ RewriteRule ^/?$ "http\:\/\/chem\-on\.com\.sg\/" [R=301,L] <Files 403.shtml> order allow,deny allow from all </Files> # RewriteCond %{HTTP_HOST} ^maha\.asia$ # RewriteRule ^/?$ "https\:\/\/www\.maha\.asia\/" [R=301,L] # RewriteCond %{HTTP_HOST} ^mahachem\.com$ [OR] # RewriteCond %{HTTP_HOST} ^www\.mahachem\.com$ # RewriteRule ^/?$ "https\:\/\/www\.maha\.asia\/" [R=301,L] # RewriteCond %{HTTP_HOST} ^maha\.asia$ # RewriteRule ^robots\.txt\/?$ "https\:\/\/www\.maha\.asia\/robots\.txt" [R=301,L] # RewriteCond %{HTTP_HOST} ^webmail\.maha\.asia$ [NC] # RewriteRule ^robots\.txt$ https://www.maha.asia/robots.txt [R=301,L] # 1) Redirect HTTP to HTTPS untuk semua domain # RewriteCond %{HTTPS} off # RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] # 2) Redirect mahachem.com (non-target) ke www.maha.asia # RewriteCond %{HTTP_HOST} ^(www\.)?mahachem\.com$ [NC] # RewriteRule ^(.*)$ https://www.maha.asia/$1 [R=301,L] RewriteCond %{HTTP_HOST} ^(www\.)?mahachem\.com$ [NC] RewriteRule ^(.*)$ https://www.maha.asia/$1 [R=301,L] # 3) Redirect maha.asia (tanpa www) ke www.maha.asia # 4) Redirect khusus untuk robots.txt dari domain non-www ke www RewriteCond %{HTTPS} off RewriteCond %{HTTP:X-Forwarded-SSL} !on RewriteCond %{HTTP_HOST} ^maha\.asia$ [OR] RewriteCond %{HTTP_HOST} ^www\.maha\.asia$ #RewriteRule ^/?$ "https\:\/\/www\.maha\.asia\/" [R=301,L] RewriteRule ^(.*)$ https://www.maha.asia/$1 [R=301,L] # php -- BEGIN cPanel-generated handler, do not edit # Set the “ea-php74” package as the default “PHP” programming language. <IfModule mime_module> AddHandler application/x-httpd-ea-php74___lsphp .php .php7 .phtml </IfModule> # php -- END cPanel-generated handler, do not edit