RewriteEngine On # local docker/localhost bypass RewriteCond %{ENV:APP_ENV} =local [OR] RewriteCond %{HTTP_HOST} ^(localhost|127\.0\.0\.1)(:[0-9]+)?$ [NC] RewriteCond %{REQUEST_URI} ^/?$ RewriteRule ^$ /egbim/index.php [R=302,L] # eg-bim.co.kr -> eg-bim.com RewriteCond %{ENV:APP_ENV} !=local RewriteCond %{HTTP_HOST} ^(www\.)?eg-bim\.co\.kr$ [NC] RewriteRule ^ https://eg-bim.com%{REQUEST_URI} [R=301,L] # m.eg-bim.co.kr -> /egbim/ RewriteCond %{ENV:APP_ENV} !=local RewriteCond %{HTTP_HOST} ^m\.eg-bim\.co\.kr$ [NC] RewriteRule ^.*$ https://eg-bim.com/egbim/ [R=301,L] # eg-bim.com 루트 -> /egbim/index.php RewriteCond %{HTTP_HOST} ^(www\.)?(eg-bim\.co\.kr|eg-bim\.com)$ [NC] RewriteCond %{REQUEST_URI} ^/?$ RewriteRule ^$ /egbim/index.php [R=302,L]